Example #1
0
func unsupportedConfigMessage(key string, nextErr gojsonschema.ResultError) string {
	service := serviceNameFromErrorField(nextErr.Field())

	message := fmt.Sprintf("Unsupported config option for %s service: '%s'", service, key)
	if val, ok := dockerConfigHints[key]; ok {
		message += fmt.Sprintf(" (did you mean '%s'?)", val)
	}

	return message
}
Example #2
0
func specificity(err gojsonschema.ResultError) int {
	return len(strings.Split(err.Field(), "."))
}