MCPcopy Create free account
hub / github.com/supabase/auth / loadDir

Method loadDir

internal/conf/confload/loader.go:178–198  ·  view source on GitHub ↗
(dst map[string]string, dir string)

Source from the content-addressed store, hash-verified

176}
177
178func (o *Loader) loadDir(dst map[string]string, dir string) error {
179 paths, err := o.getPaths(dir)
180 if err != nil {
181 return fmt.Errorf("LoadDir: %w", err)
182 }
183 if len(paths) == 0 {
184 return nil
185 }
186
187 buf := make(map[string]string)
188 for _, p := range paths {
189 clear(buf)
190
191 // Matches godotenv.Overload
192 if err := o.readFile(p, buf); err != nil {
193 return fmt.Errorf("LoadDir: %w", err)
194 }
195 o.merge(dst, buf, true)
196 }
197 return nil
198}
199
200func (o *Loader) getPaths(dir string) ([]string, error) {
201 if dir == "" {

Callers 2

startupMethod · 0.95
reloadMethod · 0.95

Calls 3

getPathsMethod · 0.95
readFileMethod · 0.95
mergeMethod · 0.95

Tested by

no test coverage detected