diff options
author | Alex Auvolat <alex@adnab.me> | 2020-01-26 20:11:17 +0100 |
---|---|---|
committer | Alex Auvolat <alex@adnab.me> | 2020-01-26 20:11:17 +0100 |
commit | d56a2530dd146c7837eca6e5844fb3b9b19062ca (patch) | |
tree | 2cde023d757ee8b82a1639f13f3a2aa1e870c197 /acl.go | |
parent | 94eafa2a9ba34d2cbcd678fff5a0dcbfcfa40e7c (diff) | |
download | bottin-d56a2530dd146c7837eca6e5844fb3b9b19062ca.tar.gz bottin-d56a2530dd146c7837eca6e5844fb3b9b19062ca.zip |
Complete README
Diffstat (limited to 'acl.go')
-rw-r--r-- | acl.go | 10 |
1 files changed, 7 insertions, 3 deletions
@@ -29,10 +29,14 @@ type ACLEntry struct { } func splitNoEmpty(s string) []string { - if len(s) == 0 { - return []string{} + tmp := strings.Split(s, " ") + ret := []string{} + for _, s := range tmp { + if len(s) > 0 { + ret = append(ret, s) + } } - return strings.Split(s, " ") + return ret } func ParseACL(def []string) (ACL, error) { |