Skip to content

Commit cbaa4cf

Browse files
authored
Merge pull request #6 from iwata/master
The numbers are not converted to hyphens.
2 parents 9556e20 + 4b7fcbc commit cbaa4cf

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ var transformPattern *regexp.Regexp
2525
var Version = "dev"
2626

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

3131
func main() {

main_test.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ func TestParamToEnv(t *testing.T) {
1616
"/a/b/five five": "FIVE_FIVE",
1717
"/a/b/Six!@#$%^&*()siX": "SIX__________SIX",
1818
"/a/b/c/d/seven": "C_D_SEVEN",
19+
"/a/b/eight8": "EIGHT8",
1920
} {
2021
assert.Equal(t, expected, paramToEnv(name, "/a/b"))
2122
}

0 commit comments

Comments
 (0)