diff options
| author | Shelley-BaoYue <baoyue2@huawei.com> | 2024-07-02 19:50:38 +0800 |
|---|---|---|
| committer | Shelley-BaoYue <baoyue2@huawei.com> | 2024-07-02 19:50:38 +0800 |
| commit | 5e77de0e60a654fe4f86c8ea3f551d183b451413 (patch) | |
| tree | 03b8ef8942cf4cf9f588325a83c06c9e5ad54fd2 /vendor/golang.org/x/sync/errgroup/pre_go120.go | |
| parent | Licensing: skip modules with fewer subdirs than mods (diff) | |
| download | kubeedge-5e77de0e60a654fe4f86c8ea3f551d183b451413.tar.gz | |
update related vendor for k8s v1.27.15
Signed-off-by: Shelley-BaoYue <baoyue2@huawei.com>
Diffstat (limited to 'vendor/golang.org/x/sync/errgroup/pre_go120.go')
| -rw-r--r-- | vendor/golang.org/x/sync/errgroup/pre_go120.go | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/vendor/golang.org/x/sync/errgroup/pre_go120.go b/vendor/golang.org/x/sync/errgroup/pre_go120.go new file mode 100644 index 000000000..88ce33434 --- /dev/null +++ b/vendor/golang.org/x/sync/errgroup/pre_go120.go @@ -0,0 +1,14 @@ +// Copyright 2023 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +//go:build !go1.20 + +package errgroup + +import "context" + +func withCancelCause(parent context.Context) (context.Context, func(error)) { + ctx, cancel := context.WithCancel(parent) + return ctx, func(error) { cancel() } +} |
