MCPcopy
hub / github.com/uber-go/nilaway / RetFieldAnnotationKey

Struct RetFieldAnnotationKey

annotation/key.go:495–502  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

493//
494// TODO: Add support for field of function return with no inference (Currently, only works with inference)
495type 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.
505func (rf *RetFieldAnnotationKey) Lookup(_ Map) (Val, bool) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected