Skip to content

Commit

Permalink
all: update go directive to 1.18
Browse files Browse the repository at this point in the history
Done with:

go get go@1.18
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 <dmitshur@golang.org>
Reviewed-by: Ian Lance Taylor <iant@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
  • Loading branch information
dmitshur authored and gopherbot committed Oct 11, 2023
1 parent 22ba207 commit 10739b0
Show file tree
Hide file tree
Showing 8 changed files with 11 additions and 396 deletions.
1 change: 0 additions & 1 deletion errgroup/go120.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.

//go:build go1.20
// +build go1.20

package errgroup

Expand Down
1 change: 0 additions & 1 deletion errgroup/go120_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.

//go:build go1.20
// +build go1.20

package errgroup_test

Expand Down
1 change: 0 additions & 1 deletion errgroup/pre_go120.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.

//go:build !go1.20
// +build !go1.20

package errgroup

Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module golang.org/x/sync

go 1.17
go 1.18
3 changes: 0 additions & 3 deletions semaphore/semaphore_bench_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

//go:build go1.7
// +build go1.7

package semaphore_test

import (
Expand Down
18 changes: 0 additions & 18 deletions syncmap/go19.go

This file was deleted.

10 changes: 10 additions & 0 deletions syncmap/map.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,13 @@
// This was the prototype for sync.Map which was added to the standard library's
// sync package in Go 1.9. https://golang.org/pkg/sync/#Map.
package syncmap

import "sync" // home to the standard library's sync.map implementation as of Go 1.9

// Map is a concurrent map with amortized-constant-time loads, stores, and deletes.
// It is safe for multiple goroutines to call a Map's methods concurrently.
//
// The zero Map is valid and empty.
//
// A Map must not be copied after first use.
type Map = sync.Map
Loading

0 comments on commit 10739b0

Please sign in to comment.