Skip to content

Commit

Permalink
Merge pull request #10 from gdbelvin/capability
Browse files Browse the repository at this point in the history
CapabilityPrimitive
  • Loading branch information
hendrikhofstadt authored Mar 19, 2021
2 parents fb117c8 + bcd16c9 commit 7f6fc39
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 7f6fc39

Please sign in to comment.