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
@@ -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
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user