Skip to content

Commit 10739b0

Browse files
dmitshurgopherbot
authored andcommitted
all: update go directive to 1.18
Done with: go get [email protected] go mod tidy go fix ./... Using go1.21.3. While here, simplify package syncmap by taking advantage of knowing that all supported Go versions will have the go1.9 build constraint satisfied. For golang/go#60268. Change-Id: Ic0f24ab13ada6839573e55beee5516c1a6c7f3cc Reviewed-on: https://go-review.googlesource.com/c/sync/+/534220 Auto-Submit: Dmitri Shuralyov <[email protected]> Reviewed-by: Ian Lance Taylor <[email protected]> LUCI-TryBot-Result: Go LUCI <[email protected]> Reviewed-by: Dmitri Shuralyov <[email protected]>
1 parent 22ba207 commit 10739b0

File tree

8 files changed

+11
-396
lines changed

8 files changed

+11
-396
lines changed

errgroup/go120.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 go1.20
6-
// +build go1.20
76

87
package errgroup
98

errgroup/go120_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 go1.20
6-
// +build go1.20
76

87
package errgroup_test
98

errgroup/pre_go120.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 !go1.20
6-
// +build !go1.20
76

87
package errgroup
98

go.mod

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
module golang.org/x/sync
22

3-
go 1.17
3+
go 1.18

semaphore/semaphore_bench_test.go

-3
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,6 @@
22
// Use of this source code is governed by a BSD-style
33
// license that can be found in the LICENSE file.
44

5-
//go:build go1.7
6-
// +build go1.7
7-
85
package semaphore_test
96

107
import (

syncmap/go19.go

-18
This file was deleted.

syncmap/map.go

+10
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,13 @@
66
// This was the prototype for sync.Map which was added to the standard library's
77
// sync package in Go 1.9. https://golang.org/pkg/sync/#Map.
88
package syncmap
9+
10+
import "sync" // home to the standard library's sync.map implementation as of Go 1.9
11+
12+
// Map is a concurrent map with amortized-constant-time loads, stores, and deletes.
13+
// It is safe for multiple goroutines to call a Map's methods concurrently.
14+
//
15+
// The zero Map is valid and empty.
16+
//
17+
// A Map must not be copied after first use.
18+
type Map = sync.Map

0 commit comments

Comments
 (0)