OpenGFW/cmd/errors.go

19 lines
245 B
Go
Raw Permalink Normal View History

2024-01-20 08:45:01 +08:00
package cmd
import (
"fmt"
)
type configError struct {
Field string
Err error
}
func (e configError) Error() string {
return fmt.Sprintf("invalid config: %s: %s", e.Field, e.Err)
}
func (e configError) Unwrap() error {
return e.Err
}