MCPcopy Create free account
hub / github.com/egonelbre/exp / pointerArg

Function pointerArg

check-deferslice/testdata/src/example/example.go:171–171  ·  view source on GitHub ↗

Passing &slice to a function implies mutation.

(p *[]int)

Source from the content-addressed store, hash-verified

169// Passing &slice to a function implies mutation.
170
171func pointerArg(p *[]int) {}
172
173func slicePointerAfterDefer() {
174 s := []int{1, 2, 3}

Callers 5

slicePointerAfterDeferFunction · 0.85
slicePointerBeforeDeferFunction · 0.85
slicePointerDifferentVarFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected