Files
polaris/pkg/types/types.go
2019-01-28 23:23:32 -05:00

22 lines
370 B
Go

package types
import (
"fmt"
)
// Failure contains information about the failing validation.
type Failure struct {
Name string
Expected string
Actual string
}
// Reason returns a string that describes the reason for a Failure.
func (f *Failure) Reason() string {
return fmt.Sprintf("%s: Expected: %s, Actual: %s.",
f.Name,
f.Expected,
f.Actual,
)
}