Repository navigation
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]] |
Answered by
ti-mo
Dec 10, 2024
Replies: 1 comment
|
Not sure what this snippet means, but
|
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
AnyTypesNameis not a method on btf.Spec.AnyTypeByNamewill only return an unambiguous type.AnyTypesByNamewill return multiple types with the same name. It's up to you to pick the one you need.