Skip to content

Commit e9dd5d2

Browse files
dmitshurgopherbot
authored andcommitted
all: switch to context package in std lib, remove obsolete +build lines
Done with: go fix ./... Using go1.21.0. Change-Id: I1a672e18186a4af800cd3623f9cb34c81cddd298 Reviewed-on: https://go-review.googlesource.com/c/perf/+/525659 Reviewed-by: Dmitri Shuralyov <[email protected]> LUCI-TryBot-Result: Go LUCI <[email protected]> Auto-Submit: Dmitri Shuralyov <[email protected]> Reviewed-by: Michael Knyszek <[email protected]>
1 parent 35ce918 commit e9dd5d2

25 files changed

+18
-33
lines changed

analysis/app/appengine.go

+1-2
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,13 @@
33
// license that can be found in the LICENSE file.
44

55
//go:build appengine
6-
// +build appengine
76

87
package app
98

109
import (
10+
"context"
1111
"net/http"
1212

13-
"golang.org/x/net/context"
1413
"google.golang.org/appengine"
1514
"google.golang.org/appengine/log"
1615
)

analysis/app/compare.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ package app
66

77
import (
88
"bytes"
9+
"context"
910
"errors"
1011
"fmt"
1112
"html/template"
@@ -17,7 +18,6 @@ import (
1718
"strings"
1819
"unicode"
1920

20-
"golang.org/x/net/context"
2121
"golang.org/x/perf/benchstat"
2222
"golang.org/x/perf/storage/benchfmt"
2323
"golang.org/x/perf/storage/query"

analysis/app/compare_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,14 @@
55
package app
66

77
import (
8+
"context"
89
"fmt"
910
"net/http"
1011
"net/http/httptest"
1112
"reflect"
1213
"strings"
1314
"testing"
1415

15-
"golang.org/x/net/context"
1616
"golang.org/x/perf/storage"
1717
"golang.org/x/perf/storage/benchfmt"
1818
)

analysis/app/local.go

+1-3
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,13 @@
33
// license that can be found in the LICENSE file.
44

55
//go:build !appengine
6-
// +build !appengine
76

87
package app
98

109
import (
10+
"context"
1111
"log"
1212
"net/http"
13-
14-
"golang.org/x/net/context"
1513
)
1614

1715
// requestContext returns the Context object for a given request.

analysis/app/trend.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ package app
88

99
import (
1010
"bytes"
11+
"context"
1112
"encoding/json"
1213
"fmt"
1314
"html/template"
@@ -22,7 +23,6 @@ import (
2223
"github.com/aclements/go-gg/generic/slice"
2324
"github.com/aclements/go-gg/ggstat"
2425
"github.com/aclements/go-gg/table"
25-
"golang.org/x/net/context"
2626
"golang.org/x/perf/storage"
2727
)
2828

analysis/appengine/app.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@
66
package main
77

88
import (
9+
"context"
910
"log"
1011
"net/http"
1112
"os"
1213
"time"
1314

14-
"golang.org/x/net/context"
1515
"golang.org/x/perf/analysis/app"
1616
"golang.org/x/perf/storage"
1717
"google.golang.org/appengine"

benchmath/mktables.go

-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
// license that can be found in the LICENSE file.
44

55
//go:build ignore
6-
// +build ignore
76

87
// Mktables pre-computes statistical tables.
98
package main

storage/app/appengine.go

+1-2
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,13 @@
33
// license that can be found in the LICENSE file.
44

55
//go:build appengine
6-
// +build appengine
76

87
package app
98

109
import (
10+
"context"
1111
"net/http"
1212

13-
"golang.org/x/net/context"
1413
"google.golang.org/appengine"
1514
"google.golang.org/appengine/log"
1615
)

storage/app/local.go

+1-3
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,13 @@
33
// license that can be found in the LICENSE file.
44

55
//go:build !appengine
6-
// +build !appengine
76

87
package app
98

109
import (
10+
"context"
1111
"log"
1212
"net/http"
13-
14-
"golang.org/x/net/context"
1513
)
1614

1715
// requestContext returns the Context object for a given request.

storage/app/query_test.go

-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
// license that can be found in the LICENSE file.
44

55
//go:build cgo
6-
// +build cgo
76

87
package app
98

storage/app/upload.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
package app
66

77
import (
8+
"context"
89
"encoding/json"
910
"errors"
1011
"fmt"
@@ -17,7 +18,6 @@ import (
1718
"strings"
1819
"time"
1920

20-
"golang.org/x/net/context"
2121
"golang.org/x/perf/storage/benchfmt"
2222
"golang.org/x/perf/storage/db"
2323
)

storage/app/upload_test.go

-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
// license that can be found in the LICENSE file.
44

55
//go:build cgo
6-
// +build cgo
76

87
package app
98

storage/appengine/app.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
package main
77

88
import (
9+
"context"
910
"errors"
1011
"fmt"
1112
"log"
@@ -15,7 +16,6 @@ import (
1516
"time"
1617

1718
_ "github.com/go-sql-driver/mysql"
18-
"golang.org/x/net/context"
1919
"golang.org/x/perf/storage/app"
2020
"golang.org/x/perf/storage/db"
2121
"golang.org/x/perf/storage/fs/gcs"

storage/client.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,14 @@
88
package storage
99

1010
import (
11+
"context"
1112
"encoding/json"
1213
"fmt"
1314
"io"
1415
"mime/multipart"
1516
"net/http"
1617
"net/url"
1718

18-
"golang.org/x/net/context"
1919
"golang.org/x/net/context/ctxhttp"
2020
"golang.org/x/perf/storage/benchfmt"
2121
)

storage/client_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@ package storage
66

77
import (
88
"bytes"
9+
"context"
910
"fmt"
1011
"io"
1112
"net/http"
1213
"net/http/httptest"
1314
"reflect"
1415
"testing"
1516

16-
"golang.org/x/net/context"
1717
"golang.org/x/perf/internal/diff"
1818
"golang.org/x/perf/storage/benchfmt"
1919
)

storage/db/db.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ package db
88

99
import (
1010
"bytes"
11+
"context"
1112
"database/sql"
1213
"fmt"
1314
"io"
@@ -18,7 +19,6 @@ import (
1819
"text/template"
1920
"time"
2021

21-
"golang.org/x/net/context"
2222
"golang.org/x/perf/storage"
2323
"golang.org/x/perf/storage/benchfmt"
2424
"golang.org/x/perf/storage/query"

storage/db/db_test.go

+1-2
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@
33
// license that can be found in the LICENSE file.
44

55
//go:build cgo
6-
// +build cgo
76

87
package db_test
98

109
import (
1110
"bytes"
11+
"context"
1212
"fmt"
1313
"reflect"
1414
"sort"
@@ -17,7 +17,6 @@ import (
1717
"testing"
1818
"time"
1919

20-
"golang.org/x/net/context"
2120
"golang.org/x/perf/internal/diff"
2221
"golang.org/x/perf/storage/benchfmt"
2322
. "golang.org/x/perf/storage/db"

storage/db/dbtest/cloud.go

-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
// license that can be found in the LICENSE file.
44

55
//go:build cloud && !plan9
6-
// +build cloud,!plan9
76

87
package dbtest
98

storage/db/dbtest/dbtest.go

-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
// license that can be found in the LICENSE file.
44

55
//go:build cgo
6-
// +build cgo
76

87
package dbtest
98

storage/db/dbtest/nocloud.go

-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
// license that can be found in the LICENSE file.
44

55
//go:build !cloud && !plan9
6-
// +build !cloud,!plan9
76

87
package dbtest
98

storage/db/sqlite3/sqlite3.go

-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
// license that can be found in the LICENSE file.
44

55
//go:build cgo
6-
// +build cgo
76

87
// Package sqlite3 provides the sqlite3 driver for
98
// x/perf/storage/db. It must be imported instead of go-sqlite3 to

storage/fs/fs.go

+1-2
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,11 @@
77
package fs
88

99
import (
10+
"context"
1011
"errors"
1112
"io"
1213
"sort"
1314
"sync"
14-
15-
"golang.org/x/net/context"
1615
)
1716

1817
// An FS stores uploaded benchmark data files.

storage/fs/gcs/gcs.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,9 @@
66
package gcs
77

88
import (
9+
"context"
10+
911
"cloud.google.com/go/storage"
10-
"golang.org/x/net/context"
1112
"golang.org/x/perf/storage/fs"
1213
)
1314

storage/fs/local/local.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@
88
package local
99

1010
import (
11+
"context"
1112
"os"
1213
"path/filepath"
1314

14-
"golang.org/x/net/context"
1515
"golang.org/x/perf/storage/fs"
1616
)
1717

storage/localperfdata/app.go

-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
// license that can be found in the LICENSE file.
44

55
//go:build cgo
6-
// +build cgo
76

87
// Localperfdata runs an HTTP server for benchmark storage.
98
//

0 commit comments

Comments
 (0)