MCPcopy Index your code
hub / github.com/jetify-com/devbox / readFromFile

Function readFromFile

internal/devconfig/config.go:185–196  ·  view source on GitHub ↗
(path string)

Source from the content-addressed store, hash-verified

183}
184
185func readFromFile(path string) (*Config, error) {
186 b, err := os.ReadFile(path)
187 if err != nil {
188 return nil, err
189 }
190 config, err := loadBytes(b)
191 if err != nil {
192 return nil, err
193 }
194 config.Root.AbsRootPath, err = filepath.Abs(path)
195 return config, err
196}
197
198func LoadConfigFromURL(ctx context.Context, url string) (*Config, error) {
199 req, err := http.NewRequestWithContext(ctx, http.MethodGet, url, nil)

Callers 3

IsDefaultFunction · 0.85
openFunction · 0.85
searchDirFunction · 0.85

Calls 1

loadBytesFunction · 0.85

Tested by

no test coverage detected