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:
Brad Fitzpatrick
2023-08-10 08:51:29 -07:00
committed by Brad Fitzpatrick
parent 3d56cafd7d
commit 7a5263e6d0
3 changed files with 8 additions and 8 deletions
+5 -5
View File
@@ -29,21 +29,21 @@ const (
Masq
)
type ErrorFWModeNotSupported struct {
type FWModeNotSupportedError struct {
Mode FirewallMode
Err error
}
func (e ErrorFWModeNotSupported) Error() string {
func (e FWModeNotSupportedError) Error() string {
return fmt.Sprintf("firewall mode %q not supported: %v", e.Mode, e.Err)
}
func (e ErrorFWModeNotSupported) Is(target error) bool {
_, ok := target.(ErrorFWModeNotSupported)
func (e FWModeNotSupportedError) Is(target error) bool {
_, ok := target.(FWModeNotSupportedError)
return ok
}
func (e ErrorFWModeNotSupported) Unwrap() error {
func (e FWModeNotSupportedError) Unwrap() error {
return e.Err
}