JSON and YAML Config
(dest interface{}, validation *StructValidation, filePath string)
| 1025 | // |
| 1026 | |
| 1027 | func ParseYAMLFile(dest interface{}, validation *StructValidation, filePath string) []error { |
| 1028 | fileInterface, err := ReadYAMLFile(filePath) |
| 1029 | if err != nil { |
| 1030 | return []error{err} |
| 1031 | } |
| 1032 | |
| 1033 | errs := Struct(dest, fileInterface, validation) |
| 1034 | if errors.HasError(errs) { |
| 1035 | return errors.WrapAll(errs, filePath) |
| 1036 | } |
| 1037 | |
| 1038 | return nil |
| 1039 | } |
| 1040 | |
| 1041 | func ParseYAMLBytes(dest interface{}, validation *StructValidation, data []byte) error { |
| 1042 | fileInterface, err := ReadYAMLBytes(data) |
nothing calls this directly
no test coverage detected