tlog.app/go/tlog@v0.23.1/examples/simplest/sub/sub.go (about) 1 package sub 2 3 import ( 4 "context" 5 6 "tlog.app/go/tlog" 7 ) 8 9 func Func(ctx context.Context, i int) { 10 tr := tlog.SpawnFromContext(ctx, "sub_routine") 11 defer tr.Finish() 12 13 tr.Printf("sub.func: %d (traced)", i) 14 }