Skip to content

Commit

Permalink
Merge pull request #20 from DiSiqueira/lower-extensions
Browse files Browse the repository at this point in the history
Fixing insensitive case to extension
  • Loading branch information
disiqueira committed Jan 5, 2017
2 parents 0c3486a + c534f50 commit a3e0123
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions ini.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ import (

func iniGet(key string) string {

key = strings.ToLower(key)

names := cfg.SectionStrings()

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

title := strings.Title(value)
key = strings.ToLower(key)

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

Expand Down

0 comments on commit a3e0123

Please sign in to comment.