github.com/alloyzeus/go-azfl@v0.0.0-20231220071816-9740126a2d07/errors/field.go (about) 1 package errors 2 3 type hasFieldErrors interface { 4 FieldErrors() []NamedError 5 } 6 7 func UnwrapFieldErrors(err error) []NamedError { 8 if prov, _ := err.(hasFieldErrors); prov != nil { 9 return prov.FieldErrors() 10 } 11 return nil 12 }