ctx, cancel := context.WithTimeout(context.Background(), 2*time.Second)
defer cancel() ctx, cancel := context.WithDeadline(
context.Background(),
time.Now().Add(10*time.Second),
)
defer cancel() ctx, cancel := context.WithCancel(context.Background())
go func() {
time.Sleep(time.Second)
cancel()
}() ctx = context.WithValue(ctx, "requestID", "abc123")