Exemplo n.º 1
0
func f(ctx context.Context, ok chan<- struct{}) {

	select {
	case <-ctx.Done():
		ctx.NOTICE("cancelled")
	}

	close(ok)
}
Exemplo n.º 2
0
func g(ctx context.Context) {
	ctx.NOTICE("G", "a", "b")
}