Skip to content

Commit a3e0123

Browse files
authored
Merge pull request #20 from DiSiqueira/lower-extensions
Fixing insensitive case to extension
2 parents 0c3486a + c534f50 commit a3e0123

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

ini.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ import (
77

88
func iniGet(key string) string {
99

10+
key = strings.ToLower(key)
11+
1012
names := cfg.SectionStrings()
1113

1214
for _, section := range names[1:] {
@@ -22,6 +24,7 @@ func iniGet(key string) string {
2224
func iniSet(key, value string) error {
2325

2426
title := strings.Title(value)
27+
key = strings.ToLower(key)
2528

2629
_, err := cfg.Section(title).NewKey(key, "")
2730

0 commit comments

Comments
 (0)