insertWrapAssign wraps a variable in-place with an errtrace.Wrap call. This is used for naked returns in functions with named return values For example, it will turn this: func foo() (err error) { // ... return } Into this: func foo() (err error) { // ... err = errtrace.Wrap(err); ret
| 1142 | // err = errtrace.Wrap(err); return |
| 1143 | // } |
| 1144 | type insertWrapAssign struct { |
| 1145 | Names []string // names of variables to wrap |
| 1146 | Before token.Pos // position to insert before |
| 1147 | } |
| 1148 | |
| 1149 | func (e *insertWrapAssign) Pos() token.Pos { |
| 1150 | return e.Before |
nothing calls this directly
no outgoing calls
no test coverage detected