Skip to content

Commit

Permalink
change files/file separator from , to ;
Browse files Browse the repository at this point in the history
  • Loading branch information
saltyblu committed Jun 29, 2017
1 parent d881bd3 commit 9a3d7c0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions htpasswd/backend.go
Expand Up @@ -24,13 +24,13 @@ func BackendFactory(config map[string]string) (login.Backend, error) {
var files []string

if f, exist := config["files"]; exist {
for _, file := range strings.Split(f, ",") {
for _, file := range strings.Split(f, ";") {
files = append(files, file)
}
}

if f, exist := config["file"]; exist {
for _, file := range strings.Split(f, ",") {
for _, file := range strings.Split(f, ";") {
files = append(files, file)
}
}
Expand Down
6 changes: 3 additions & 3 deletions htpasswd/backend_test.go
Expand Up @@ -35,7 +35,7 @@ func TestSetupTwoFiles(t *testing.T) {
morphed = append(morphed, File{name: curFile})
}
backend, err := p(map[string]string{
"file": strings.Join(filenames, ","),
"file": strings.Join(filenames, ";"),
})

NoError(t, err)
Expand All @@ -58,8 +58,8 @@ func TestSetupTwoConfigs(t *testing.T) {
}

backend, err := p(map[string]string{
"files": strings.Join(configFiles, ","),
"file": strings.Join(configFile, ","),
"files": strings.Join(configFiles, ";"),
"file": strings.Join(configFile, ";"),
})

NoError(t, err)
Expand Down

0 comments on commit 9a3d7c0

Please sign in to comment.