MCPcopy Create free account
hub / github.com/TheThingsNetwork/lorawan-stack / FieldIsZero

Method FieldIsZero

pkg/ttnpb/lorawan.go:854–865  ·  view source on GitHub ↗

FieldIsZero returns whether path p is zero.

(p string)

Source from the content-addressed store, hash-verified

852
853// FieldIsZero returns whether path p is zero.
854func (v *MHDR) FieldIsZero(p string) bool {
855 if v == nil {
856 return true
857 }
858 switch p {
859 case "m_type":
860 return v.MType == 0
861 case "major":
862 return v.Major == 0
863 }
864 panic(fmt.Sprintf("unknown path '%s'", p))
865}
866
867// FieldIsZero returns whether path p is zero.
868func (v *JoinAcceptPayload) FieldIsZero(p string) bool {

Callers 11

ValidateFieldIsZeroMethod · 0.45
SetFuncMethod · 0.45
validateZeroFieldsFunction · 0.45
fieldsAreZeroFunction · 0.45
TestFieldIsZeroFunction · 0.45
FieldIsZeroMethod · 0.45
FieldIsZeroMethod · 0.45
FieldIsZeroMethod · 0.45
FieldIsZeroMethod · 0.45
NonZeroFieldsFunction · 0.45

Calls

no outgoing calls

Tested by 1

TestFieldIsZeroFunction · 0.36