func addCapability(cap pb.Capability, caps []pb.Capability) []pb.Capability {
	var ncaps []pb.Capability
	for _, a := range caps {
		if a == cap {
			return caps
		}
		ncaps = append(ncaps, a)
	}
	ncaps = append(ncaps, cap)
	return ncaps
}
addCapability is an internal convenience function to add
capabilities if they do not already exist in a capability slice.
package hooks
import (
	"strings"
	pb "github.com/netauth/protocol"
)
func splitKeyValue(s string) (string, string) {
	parts := strings.SplitN(s, ":", 2)
	return parts[0], parts[1]
}