mirror of
https://github.com/FairwindsOps/polaris.git
synced 2026-05-14 13:16:54 +00:00
22 lines
374 B
Go
22 lines
374 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.\n",
|
|
f.Name,
|
|
f.Expected,
|
|
f.Actual,
|
|
)
|
|
}
|