(dest interface{}, validation *StructValidation, data []byte)
| 1039 | } |
| 1040 | |
| 1041 | func ParseYAMLBytes(dest interface{}, validation *StructValidation, data []byte) error { |
| 1042 | fileInterface, err := ReadYAMLBytes(data) |
| 1043 | if err != nil { |
| 1044 | return err |
| 1045 | } |
| 1046 | |
| 1047 | errs := Struct(dest, fileInterface, validation) |
| 1048 | if errors.HasError(errs) { |
| 1049 | return errors.FirstError(errs...) |
| 1050 | } |
| 1051 | |
| 1052 | return nil |
| 1053 | } |
| 1054 | |
| 1055 | func ReadYAMLFile(filePath string) (interface{}, error) { |
| 1056 | fileBytes, err := files.ReadFileBytes(filePath) |
nothing calls this directly
no test coverage detected