Skip to content

Commit bf8b944

Browse files
prestistdustymabe
authored andcommitted
mantle: replace deprecated golang.org/x/net/context import
SA1019: "golang.org/x/net/context" is deprecated: Use the standard library context package instead.
1 parent 71ddc67 commit bf8b944

File tree

8 files changed

+12
-8
lines changed

8 files changed

+12
-8
lines changed

mantle/cmd/ore/gcloud/image.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,9 @@ import (
1818
"fmt"
1919
"os"
2020

21+
"context"
22+
2123
"github.com/spf13/cobra"
22-
"golang.org/x/net/context"
2324
)
2425

2526
var (

mantle/cmd/ore/gcloud/promote-image.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,10 @@
1515
package gcloud
1616

1717
import (
18+
"context"
19+
1820
"github.com/coreos/coreos-assembler/mantle/platform/api/gcloud"
1921
"github.com/spf13/cobra"
20-
"golang.org/x/net/context"
2122
)
2223

2324
var (

mantle/kola/tests/crio/crio.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,9 @@ import (
2222
"strings"
2323
"time"
2424

25+
"context"
26+
2527
"golang.org/x/crypto/ssh"
26-
"golang.org/x/net/context"
2728

2829
"github.com/coreos/coreos-assembler/mantle/kola"
2930
"github.com/coreos/coreos-assembler/mantle/kola/cluster"

mantle/kola/tests/docker/docker.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,9 @@ import (
2424
"strings"
2525
"time"
2626

27+
"context"
28+
2729
"golang.org/x/crypto/ssh"
28-
"golang.org/x/net/context"
2930

3031
"github.com/coreos/coreos-assembler/mantle/kola/cluster"
3132
"github.com/coreos/coreos-assembler/mantle/kola/register"

mantle/lang/worker/group.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@
1515
package worker
1616

1717
import (
18+
"context"
1819
"sync"
1920

2021
"github.com/coreos/pkg/multierror"
21-
"golang.org/x/net/context"
2222
)
2323

2424
// Worker is a function that WorkerGroup will run in a new goroutine.

mantle/lang/worker/parallel.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
package worker
1616

1717
import (
18-
"golang.org/x/net/context"
18+
"context"
1919
)
2020

2121
// Parallel executes a set of Workers and waits for them to finish.

mantle/platform/api/gcloud/image.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@
1515
package gcloud
1616

1717
import (
18+
"context"
1819
"fmt"
1920
"runtime"
2021
"strings"
2122

22-
"golang.org/x/net/context"
2323
"google.golang.org/api/compute/v1"
2424
)
2525

mantle/platform/platform.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ package platform
1616

1717
import (
1818
"bytes"
19+
"context"
1920
"encoding/json"
2021
"fmt"
2122
"io"
@@ -30,7 +31,6 @@ import (
3031
"github.com/kballard/go-shellquote"
3132
"github.com/pkg/errors"
3233
"golang.org/x/crypto/ssh"
33-
"golang.org/x/net/context"
3434

3535
"github.com/coreos/coreos-assembler/mantle/platform/conf"
3636
"github.com/coreos/coreos-assembler/mantle/util"

0 commit comments

Comments
 (0)