1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00
moby--moby/vendor/github.com/mitchellh/hashstructure/v2/errors.go
CrazyMax a2aaf4cc83
vendor buildkit v0.10.0
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2022-03-22 18:51:27 +01:00

22 lines
592 B
Go

package hashstructure
import (
"fmt"
)
// ErrNotStringer is returned when there's an error with hash:"string"
type ErrNotStringer struct {
Field string
}
// Error implements error for ErrNotStringer
func (ens *ErrNotStringer) Error() string {
return fmt.Sprintf("hashstructure: %s has hash:\"string\" set, but does not implement fmt.Stringer", ens.Field)
}
// ErrFormat is returned when an invalid format is given to the Hash function.
type ErrFormat struct{}
func (*ErrFormat) Error() string {
return "format must be one of the defined Format values in the hashstructure library"
}