MCPcopy
hub / github.com/OpenListTeam/OpenList / GetObjMask

Function GetObjMask

internal/model/obj.go:271–282  ·  view source on GitHub ↗
(obj Obj)

Source from the content-addressed store, hash-verified

269}
270
271func GetObjMask(obj Obj) ObjMask {
272 for {
273 switch o := obj.(type) {
274 case interface{ GetObjMask() ObjMask }:
275 return o.GetObjMask()
276 case ObjUnwrap:
277 obj = o.Unwrap()
278 default:
279 return 0
280 }
281 }
282}
283
284func ObjHasMask(obj Obj, mask ObjMask) bool {
285 return GetObjMask(obj)&mask != 0

Callers 5

ListMethod · 0.92
GetMethod · 0.92
GetMethod · 0.92
ListMethod · 0.92
ObjHasMaskFunction · 0.85

Calls 2

UnwrapMethod · 0.65
GetObjMaskMethod · 0.45

Tested by

no test coverage detected