summaryrefslogtreecommitdiff
path: root/src/nshd/hackers_git/hackers_parse.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/nshd/hackers_git/hackers_parse.go')
-rw-r--r--src/nshd/hackers_git/hackers_parse.go9
1 files changed, 2 insertions, 7 deletions
diff --git a/src/nshd/hackers_git/hackers_parse.go b/src/nshd/hackers_git/hackers_parse.go
index f7baa68..77b9a13 100644
--- a/src/nshd/hackers_git/hackers_parse.go
+++ b/src/nshd/hackers_git/hackers_parse.go
@@ -77,7 +77,7 @@ func parse_user_yaml(filename string) (ret user, err error) {
}
if iface, isSet := data["groups"]; !isSet {
- ret.groups = make([]string, 0)
+ ret.groups = make(map[string]bool, 0)
} else if ary, isTyp := iface.([]interface{}); !isTyp {
errs = append(errs, "\"groups\" is not an array")
} else {
@@ -93,12 +93,7 @@ func parse_user_yaml(filename string) (ret user, err error) {
}
}
if !e {
- ret.groups = make([]string, len(groups))
- var i uint = 0
- for group, _ := range groups {
- ret.groups[i] = group
- i++
- }
+ ret.groups = groups
}
}
}