cert-manager/pkg/util/errors/errors.go
2017-09-09 18:27:35 +01:00

17 lines
304 B
Go

package errors
import "fmt"
type invalidDataError struct{ error }
func NewInvalidData(str string, obj ...interface{}) error {
return &invalidDataError{error: fmt.Errorf(str, obj...)}
}
func IsInvalidData(err error) bool {
if _, ok := err.(*invalidDataError); !ok {
return false
}
return true
}