aboutsummaryrefslogtreecommitdiff
path: root/acl.go
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2020-01-26 20:11:17 +0100
committerAlex Auvolat <alex@adnab.me>2020-01-26 20:11:17 +0100
commitd56a2530dd146c7837eca6e5844fb3b9b19062ca (patch)
tree2cde023d757ee8b82a1639f13f3a2aa1e870c197 /acl.go
parent94eafa2a9ba34d2cbcd678fff5a0dcbfcfa40e7c (diff)
downloadbottin-d56a2530dd146c7837eca6e5844fb3b9b19062ca.tar.gz
bottin-d56a2530dd146c7837eca6e5844fb3b9b19062ca.zip
Complete README
Diffstat (limited to 'acl.go')
-rw-r--r--acl.go10
1 files changed, 7 insertions, 3 deletions
diff --git a/acl.go b/acl.go
index 8cb433f..483e8fd 100644
--- a/acl.go
+++ b/acl.go
@@ -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) {