Skip to content

Commit 4a7d1b0

Browse files
committed
add testdata
Signed-off-by: sivchari <[email protected]>
1 parent 24feb2b commit 4a7d1b0

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
//golangitest:args -Ectxcause
2+
package testdata
3+
4+
import (
5+
"context"
6+
"time"
7+
)
8+
9+
func ctxcause() {
10+
ctx, cancel := context.WithCancel(context.Background()) // want "context.WithCancel should be replaced with context.WithCancelCause"
11+
ctx, cancel = context.WithTimeout(context.Background(), 1*time.Second) // want "context.WithTimeout should be replaced with context.WithTimeoutCause"
12+
ctx, cancel = context.WithDeadline(context.Background(), time.Now().Add(1*time.Second)) // want "context.WithDeadline should be replaced with context.WithDeadlineCause"
13+
_, _ = ctx, cancel
14+
}

0 commit comments

Comments
 (0)