MCPcopy
hub / github.com/protocolbuffers/protobuf-go / offsetOf

Function offsetOf

internal/impl/pointer_unsafe.go:25–27  ·  view source on GitHub ↗

offsetOf returns a field offset for the struct field.

(f reflect.StructField)

Source from the content-addressed store, hash-verified

23
24// offsetOf returns a field offset for the struct field.
25func offsetOf(f reflect.StructField) offset {
26 return offset(f.Offset)
27}
28
29// IsValid reports whether the offset is valid.
30func (f offset) IsValid() bool { return f != invalidOffset }

Callers 15

makeStructInfoMethod · 0.85
fieldInfoForMapOpaqueMethod · 0.85
makeCoderMethodsMethod · 0.85
fieldInfoForOneofFunction · 0.85
fieldInfoForMapFunction · 0.85
fieldInfoForListFunction · 0.85

Calls 1

offsetTypeAlias · 0.85

Tested by

no test coverage detected