github.com/haraldrudell/parl@v0.4.176/g0/go-context_test.go (about) 1 /* 2 © 2022–present Harald Rudell <harald.rudell@gmail.com> (https://haraldrudell.github.io/haraldrudell/) 3 ISC License 4 */ 5 6 package g0 7 8 import ( 9 "context" 10 "testing" 11 ) 12 13 func TestGoContext(t *testing.T) { 14 type X struct { 15 goContext 16 } 17 x := &X{} 18 newGoContext(&x.goContext, context.Background()) 19 x.Context() 20 x.Cancel() 21 }