Skip to content

Commit

Permalink
Merge pull request #6 from iwata/master
Browse files Browse the repository at this point in the history
The numbers are not converted to hyphens.
  • Loading branch information
pda committed Jul 12, 2018
2 parents 9556e20 + 4b7fcbc commit cbaa4cf
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ var transformPattern *regexp.Regexp
var Version = "dev"

func init() {
transformPattern = regexp.MustCompile("[^A-Z_]")
transformPattern = regexp.MustCompile("[^A-Z0-9_]")
}

func main() {
Expand Down
1 change: 1 addition & 0 deletions main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ func TestParamToEnv(t *testing.T) {
"/a/b/five five": "FIVE_FIVE",
"/a/b/Six!@#$%^&*()siX": "SIX__________SIX",
"/a/b/c/d/seven": "C_D_SEVEN",
"/a/b/eight8": "EIGHT8",
} {
assert.Equal(t, expected, paramToEnv(name, "/a/b"))
}
Expand Down

0 comments on commit cbaa4cf

Please sign in to comment.