Skip to content

Commit

Permalink
CapabilityPrimitive
Browse files Browse the repository at this point in the history
  • Loading branch information
gdbelvin committed Mar 19, 2021
1 parent fb117c8 commit bcd16c9
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions commands/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -165,3 +165,12 @@ const (
ListObjectParamID uint8 = 0x01
ListObjectParamType uint8 = 0x02
)

// CapabilityPrimitiveFromSlice OR's all the capabilitites together.
func CapabilityPrimitiveFromSlice(capabilitites []uint64) uint64 {
var primitive uint64
for _, c := range capabilitites {
primitive |= c
}
return primitive
}

0 comments on commit bcd16c9

Please sign in to comment.