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