util/linuxfw: rename ErrorFWModeNotSupported
Go style is for error variables to start with "err" (or "Err") and for error types to end in "Error". Updates #cleanup Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
This commit is contained in:

committed by
Brad Fitzpatrick

parent
3d56cafd7d
commit
7a5263e6d0
@ -107,7 +107,7 @@ func DebugNetfilter(logf logger.Logf) error {
|
||||
func DetectNetfilter() (int, error) {
|
||||
conn, err := nftables.New()
|
||||
if err != nil {
|
||||
return 0, ErrorFWModeNotSupported{
|
||||
return 0, FWModeNotSupportedError{
|
||||
Mode: FirewallModeNfTables,
|
||||
Err: err,
|
||||
}
|
||||
@ -115,7 +115,7 @@ func DetectNetfilter() (int, error) {
|
||||
|
||||
chains, err := conn.ListChains()
|
||||
if err != nil {
|
||||
return 0, ErrorFWModeNotSupported{
|
||||
return 0, FWModeNotSupportedError{
|
||||
Mode: FirewallModeNfTables,
|
||||
Err: fmt.Errorf("cannot list chains: %w", err),
|
||||
}
|
||||
|
Reference in New Issue
Block a user