diff --git a/plugins/config/config.go b/plugins/config/config.go index c170c7800..b0ef6e435 100644 --- a/plugins/config/config.go +++ b/plugins/config/config.go @@ -17,28 +17,6 @@ func GetWithDefault(appName string, key string, defaultValue string) string { return env.GetDefault(key, defaultValue) } -// GetWithDefault returns the value set for a given key, returning defaultValue if none found -// func GetWithDefault(appName string, key string, defaultValue string) (value string) { -// value = defaultValue - -// envFile := strings.Join([]string{common.MustGetEnv("DOKKU_ROOT"), appName, "ENV"}, "/") -// lines, err := common.FileToSlice(envFile) -// if err != nil { -// return -// } -// prefix := fmt.Sprintf("export %v=", key) -// for _, line := range lines { -// if !strings.HasPrefix(line, prefix) { -// continue -// } -// value = strings.TrimPrefix(line, prefix) -// if strings.HasPrefix(value, "'") && strings.HasSuffix(value, "'") { -// value = strings.TrimPrefix(strings.TrimSuffix(value, "'"), "'") -// } -// } -// return -// } - //HasKey determines if the config given by appName has a value for the given key func HasKey(appName string, key string) bool { env, err := loadConfig(appName)