(_ context.Context, config *config.AppConfig)
| 36 | } |
| 37 | |
| 38 | func (y *readerLoader) Load(_ context.Context, config *config.AppConfig) (err error) { |
| 39 | switch y.format { |
| 40 | case FormatYAML: |
| 41 | err = y.loadYAML(y.reader, config) |
| 42 | case FormatJSON: |
| 43 | err = y.loadJSON(y.reader, config) |
| 44 | default: |
| 45 | err = fmt.Errorf("invalid format: %s", y.format) |
| 46 | } |
| 47 | if err != nil { |
| 48 | return err |
| 49 | } |
| 50 | if err := fixCompatibility(config, y.logger); err != nil { |
| 51 | return err |
| 52 | } |
| 53 | structutils.Defaults(config) |
| 54 | return nil |
| 55 | } |
| 56 | |
| 57 | func (y *readerLoader) LoadConnection( |
| 58 | _ context.Context, |
nothing calls this directly
no test coverage detected