(ctx context.Context)
| 76 | } |
| 77 | |
| 78 | func (s *Server) aliasedHelperMisuse(ctx context.Context) error { |
| 79 | return s.db.InTx(func(tx Store) error { |
| 80 | alias := s |
| 81 | alias.getConfig(ctx) // want "call to 'alias[.]getConfig' inside InTx uses outer store 's[.]db'; pass 'tx' through the helper or hoist the call" |
| 82 | return nil |
| 83 | }, nil) |
| 84 | } |
| 85 | |
| 86 | func (s *Server) goFuncLiteralMisuse(ctx context.Context) error { |
| 87 | return s.db.InTx(func(tx Store) error { |