-
structTypes, err := spec.AnyTypesName(struct_name)
if err != nil {
return 0, fmt.Errorf("无法找到结构体 %s: %v", struct_name, err)
}
iov_iter: found multiple types: [Struct:"iov_iter"[fields=5] Struct:"iov_iter"[fields=5]] |
Beta Was this translation helpful? Give feedback.
Answered by
ti-mo
Dec 10, 2024
Replies: 1 comment
-
Not sure what this snippet means, but
|
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
ti-mo
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Not sure what this snippet means, but
AnyTypesName
is not a method on btf.Spec.AnyTypeByName
will only return an unambiguous type.AnyTypesByName
will return multiple types with the same name. It's up to you to pick the one you need.