File tree 6 files changed +14
-14
lines changed
pkg/golinters/exptostd/testdata
6 files changed +14
-14
lines changed Original file line number Diff line number Diff line change @@ -4,8 +4,8 @@ package testdata
4
4
import (
5
5
"fmt"
6
6
7
- "golang.org/x/exp/maps"
8
- "golang.org/x/exp/slices"
7
+ "golang.org/x/exp/maps" // want `Import statement 'golang.org/x/exp/maps' can be replaced by 'maps'`
8
+ "golang.org/x/exp/slices" // want `Import statement 'golang.org/x/exp/slices' can be replaced by 'slices'`
9
9
)
10
10
11
11
func _ (m , a map [string ]string ) {
Original file line number Diff line number Diff line change @@ -15,8 +15,8 @@ import (
15
15
"fmt"
16
16
"unsafe"
17
17
18
- "golang.org/x/exp/maps"
19
- "golang.org/x/exp/slices"
18
+ "golang.org/x/exp/maps" // want `Import statement 'golang.org/x/exp/maps' can be replaced by 'maps'`
19
+ "golang.org/x/exp/slices" // want `Import statement 'golang.org/x/exp/slices' can be replaced by 'slices'`
20
20
)
21
21
22
22
func _ () {
Original file line number Diff line number Diff line change @@ -6,16 +6,16 @@ package testdata
6
6
import (
7
7
"fmt"
8
8
9
- "golang.org/x/exp/maps"
10
- "golang.org/x/exp/slices"
9
+ "golang.org/x/exp/maps" // want `Import statement 'golang.org/x/exp/maps' can be replaced by 'maps'`
10
+ "golang.org/x/exp/slices" // want `Import statement 'golang.org/x/exp/slices' can be replaced by 'slices'`
11
11
)
12
12
13
13
func _ (m , a map [string ]string ) {
14
14
maps .Clone (m ) // want `golang.org/x/exp/maps.Clone\(\) can be replaced by maps.Clone\(\)`
15
15
16
16
maps .Keys (m ) // want `golang.org/x/exp/maps.Keys\(\) can be replaced by slices.Collect\(maps.Keys\(\)\)`
17
17
18
- maps .Values (m ) // want `golang.org/x/exp/maps.Values\(\) can be replaced by slices.Collect\(maps.Keys \(\)\)`
18
+ maps .Values (m ) // want `golang.org/x/exp/maps.Values\(\) can be replaced by slices.Collect\(maps.Values \(\)\)`
19
19
20
20
maps .Equal (m , a ) // want `golang.org/x/exp/maps.Equal\(\) can be replaced by maps.Equal\(\)`
21
21
Original file line number Diff line number Diff line change @@ -17,8 +17,8 @@ import (
17
17
"fmt"
18
18
"unsafe"
19
19
20
- "golang.org/x/exp/maps"
21
- "golang.org/x/exp/slices"
20
+ "golang.org/x/exp/maps" // want `Import statement 'golang.org/x/exp/maps' can be replaced by 'maps'`
21
+ "golang.org/x/exp/slices" // want `Import statement 'golang.org/x/exp/slices' can be replaced by 'slices'`
22
22
)
23
23
24
24
func _ () {
@@ -32,7 +32,7 @@ func _(m, a map[string]string) {
32
32
33
33
maps .Keys (m ) // want `golang.org/x/exp/maps.Keys\(\) can be replaced by slices.Collect\(maps.Keys\(\)\)`
34
34
35
- maps .Values (m ) // want `golang.org/x/exp/maps.Values\(\) can be replaced by slices.Collect\(maps.Keys \(\)\)`
35
+ maps .Values (m ) // want `golang.org/x/exp/maps.Values\(\) can be replaced by slices.Collect\(maps.Values \(\)\)`
36
36
37
37
maps .Equal (m , a ) // want `golang.org/x/exp/maps.Equal\(\) can be replaced by maps.Equal\(\)`
38
38
Original file line number Diff line number Diff line change @@ -4,8 +4,8 @@ package testdata
4
4
import (
5
5
"fmt"
6
6
7
- "golang.org/x/exp/maps"
8
- "golang.org/x/exp/slices"
7
+ "golang.org/x/exp/maps" // want `Import statement 'golang.org/x/exp/maps' can be replaced by 'maps'`
8
+ "golang.org/x/exp/slices" // want `Import statement 'golang.org/x/exp/slices' can be replaced by 'slices'`
9
9
)
10
10
11
11
func _ (m , a map [string ]string ) {
Original file line number Diff line number Diff line change @@ -4,8 +4,8 @@ package testdata
4
4
import (
5
5
"fmt"
6
6
7
- "maps"
8
- "slices"
7
+ "maps" // want `Import statement 'golang.org/x/exp/maps' can be replaced by 'maps'`
8
+ "slices" // want `Import statement 'golang.org/x/exp/slices' can be replaced by 'slices'`
9
9
)
10
10
11
11
func _ (m , a map [string ]string ) {
You can’t perform that action at this time.
0 commit comments