fix CAP messages

This commit is contained in:
Jeremy Latt 2014-03-08 13:59:48 -08:00
parent f56db354ee
commit 33df043961
4 changed files with 26 additions and 16 deletions

View file

@ -14,6 +14,10 @@ type CapSubCommand string
type Capability string
func (capability Capability) String() string {
return string(capability)
}
type CapModifier rune
func (mod CapModifier) String() string {
@ -34,6 +38,16 @@ func (set CapabilitySet) String() string {
return strings.Join(strs, " ")
}
func (set CapabilitySet) DisableString() string {
parts := make([]string, len(set))
index := 0
for capability := range set {
parts[index] = Disable.String() + capability.String()
index += 1
}
return strings.Join(parts, " ")
}
// a string with wildcards
type Mask string