MCPcopy Index your code
hub / github.com/coder/coder / indirectMisuse

Method indirectMisuse

scripts/intxcheck/testdata/src/example/example.go:55–60  ·  view source on GitHub ↗
(ctx context.Context)

Source from the content-addressed store, hash-verified

53}
54
55func (s *Server) indirectMisuse(ctx context.Context) error {
56 return s.db.InTx(func(tx Store) error {
57 s.getConfig(ctx) // want "call to 's[.]getConfig' inside InTx uses outer store 's[.]db'; pass 'tx' through the helper or hoist the call"
58 return nil
59 }, nil)
60}
61
62func (s *Server) shadowedLocalOK(ctx context.Context) error {
63 return s.db.InTx(func(tx Store) error {

Callers

nothing calls this directly

Calls 2

getConfigMethod · 0.95
InTxMethod · 0.65

Tested by

no test coverage detected