github.com/prysmaticlabs/prysm@v1.4.4/tools/analyzers/ineffassign/testdata/ctx_assignment.go (about) 1 package testdata 2 3 import ( 4 "context" 5 "fmt" 6 ) 7 8 // This returns the head state. 9 // It does a full copy on head state for immutability. 10 func headState(ctx context.Context) { 11 ctx, span := StartSpan(ctx, "blockChain.headState") 12 fmt.Print(span) 13 return 14 } 15 16 // StartSpan -- 17 func StartSpan(ctx context.Context, name string) (context.Context, int) { 18 return ctx, 42 19 }