RetFieldAnnotationKey allows the Lookup of the Annotation on a specific field within a function's return of struct (or pointer to struct) type, in the Annotation Map. This key is only effective when the struct initialization checking is enabled. TODO: Add support for field of function return with n
| 493 | // |
| 494 | // TODO: Add support for field of function return with no inference (Currently, only works with inference) |
| 495 | type RetFieldAnnotationKey struct { |
| 496 | // FuncDecl is the function type of function containing return |
| 497 | FuncDecl *types.Func |
| 498 | // RetNum is the index of the return for the key |
| 499 | RetNum int |
| 500 | // FieldDecl is the declaration for the field of the key |
| 501 | FieldDecl *types.Var |
| 502 | } |
| 503 | |
| 504 | // Lookup looks this key up in the passed map, returning a Val. |
| 505 | func (rf *RetFieldAnnotationKey) Lookup(_ Map) (Val, bool) { |
nothing calls this directly
no outgoing calls
no test coverage detected