add comment, fix golint

This commit is contained in:
rui.zheng
2017-08-12 19:55:35 +08:00
parent fb713ae73c
commit 4d5fa98857
8 changed files with 78 additions and 34 deletions
+1
View File
@@ -75,6 +75,7 @@ func ParseNode(s string) (node Node, err error) {
return
}
// Can tests whether the given action and address is allowed by the whitelist and blacklist.
func Can(action string, addr string, whitelist, blacklist *Permissions) bool {
if !strings.Contains(addr, ":") {
addr = addr + ":80"