MCPcopy Create free account
hub / github.com/encodeous/nylon / readNodeConfig

Function readNodeConfig

core/entrypoint.go:85–96  ·  view source on GitHub ↗
(nodePath string)

Source from the content-addressed store, hash-verified

83}
84
85func readNodeConfig(nodePath string) (*state.LocalCfg, error) {
86 var nodeCfg state.LocalCfg
87 file, err := os.ReadFile(nodePath)
88 if err != nil {
89 return nil, err
90 }
91 err = yaml.Unmarshal(file, &nodeCfg)
92 if err != nil {
93 return nil, err
94 }
95 return &nodeCfg, nil
96}
97
98func fatal(msg string, err error) {
99 fmt.Fprintf(os.Stderr, "Error: %s: %v\n", msg, err)

Callers 1

BootstrapFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected