Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion source/env.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@ type EnvSource struct {
// format. Periods are replaced with single underscores. Note that reversing
// this would generally be ambiguous as underscores are common in variable keys.
func envamize(key string) string {
return strings.Replace(strings.ToUpper(key), ".", "_", -1)
key = strings.ReplaceAll(key, "-", "_")
key = strings.ReplaceAll(key, ".", "_")
return strings.ToUpper(key)
}

func NewEnvSource() *EnvSource {
Expand Down