CapabilityPrimitive

This commit is contained in:
Gary Belvin 2021-03-04 16:14:46 +00:00
parent fb117c8072
commit bcd16c93b1
1 changed files with 9 additions and 0 deletions

View File

@ -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
}