INNER CODE UNIT · Go

configs

offen/docker-volume-backup · cmd/backup/config_provider.go:99

	configs := []*Config{}
	for _, item := range items {
		if item.IsDir() {
			continue
		}
		p := filepath.Join(directory, item.Name())
		envFile, err := source(p)
		if err != nil {
			return nil, errwrap.Wrap(err, fmt.Sprintf("error reading config file %s", p))
		}
		lookup := func(key string) (string, bool) {
			val, ok := envFile[key]
			if ok {
				return val, ok
			}
			return os.LookupEnv(key)
		}
		c, err := loadConfig(lookup)

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…