MCPcopy Index your code
hub / github.com/ContainerSSH/ContainerSSH / Load

Method Load

internal/config/loader_reader.go:38–55  ·  view source on GitHub ↗
(_ context.Context, config *config.AppConfig)

Source from the content-addressed store, hash-verified

36}
37
38func (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
57func (y *readerLoader) LoadConnection(
58 _ context.Context,

Callers

nothing calls this directly

Calls 5

loadYAMLMethod · 0.95
loadJSONMethod · 0.95
DefaultsFunction · 0.92
fixCompatibilityFunction · 0.85
ErrorfMethod · 0.65

Tested by

no test coverage detected