MCPcopy
hub / github.com/dagger/container-use / Load

Method Load

environment/config.go:146–160  ·  view source on GitHub ↗
(baseDir string)

Source from the content-addressed store, hash-verified

144}
145
146func (config *EnvironmentConfig) Load(baseDir string) error {
147 configPath := filepath.Join(baseDir, configDir)
148
149 data, err := os.ReadFile(filepath.Join(configPath, environmentFile))
150 if err != nil && !os.IsNotExist(err) {
151 return err
152 }
153 if err == nil {
154 if err := json.Unmarshal(data, config); err != nil {
155 return err
156 }
157 }
158
159 return nil
160}

Callers 7

CreateMethod · 0.80
LoadInfoFunction · 0.80
withConfigFunction · 0.80
updateConfigFunction · 0.80
config.goFile · 0.80

Calls 1

UnmarshalMethod · 0.80