infra
/
goutils
Archived
1
0
Fork 0
This repository has been archived on 2022-04-06. You can view files and clone it, but cannot push or open issues or pull requests.
goutils/vendor/github.com/modern-go/reflect2/safe_struct.go

13 lines
270 B
Go

package reflect2
type safeStructType struct {
safeType
}
func (type2 *safeStructType) FieldByName(name string) StructField {
field, found := type2.Type.FieldByName(name)
if !found {
panic("field " + name + " not found")
}
return &safeField{StructField: field}
}