GoTypeDefWithTargetPkg returns the Go type definition string, qualifying any user types inside inline structs with the provided target package. This helps when generating JSON-RPC client types that embed inline structs referencing user types defined in a separate package (e.g., gen/types).
(att *expr.AttributeExpr, ptr, useDefault bool, targetPkg string)
| 137 | // when generating JSON-RPC client types that embed inline structs referencing |
| 138 | // user types defined in a separate package (e.g., gen/types). |
| 139 | func (s *NameScope) GoTypeDefWithTargetPkg(att *expr.AttributeExpr, ptr, useDefault bool, targetPkg string) string { |
| 140 | return s.goTypeDefWithPkgOverride(att, ptr, useDefault, "", targetPkg) |
| 141 | } |
| 142 | |
| 143 | // goTypeDefWithPkgOverride generates the Go type definition string for the attribute. |
| 144 | // When targetPkg is not empty, user types referenced inside inline structs are |
no test coverage detected