mirror of
https://github.com/docker/cli.git
synced 2026-10-23 19:12:36 +03:00
modernize: reflecttypefor
go install golang.org/x/tools/go/analysis/passes/modernize/cmd/modernize@latest
modernize -reflecttypefor -fix ./...
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
@@ -151,7 +151,7 @@ func TestValidateCandidate(t *testing.T) {
|
||||
assert.ErrorContains(t, err, tc.err)
|
||||
case tc.invalid != "":
|
||||
assert.NilError(t, err)
|
||||
assert.Assert(t, is.ErrorType(p.Err, reflect.TypeOf(&pluginError{})))
|
||||
assert.Assert(t, is.ErrorType(p.Err, reflect.TypeFor[*pluginError]()))
|
||||
assert.ErrorContains(t, p.Err, tc.invalid)
|
||||
default:
|
||||
assert.NilError(t, err)
|
||||
|
||||
@@ -1153,7 +1153,7 @@ func TestLoadMultipleServiceVolumes(t *testing.T) {
|
||||
func TestMergeUlimitsConfig(t *testing.T) {
|
||||
specials := &specials{
|
||||
m: map[reflect.Type]func(dst, src reflect.Value) error{
|
||||
reflect.TypeOf(&types.UlimitsConfig{}): mergeUlimitsConfig,
|
||||
reflect.TypeFor[*types.UlimitsConfig](): mergeUlimitsConfig,
|
||||
},
|
||||
}
|
||||
base := map[string]*types.UlimitsConfig{
|
||||
@@ -1189,7 +1189,7 @@ func TestMergeUlimitsConfig(t *testing.T) {
|
||||
func TestMergeServiceNetworkConfig(t *testing.T) {
|
||||
specials := &specials{
|
||||
m: map[reflect.Type]func(dst, src reflect.Value) error{
|
||||
reflect.TypeOf(&types.ServiceNetworkConfig{}): mergeServiceNetworkConfig,
|
||||
reflect.TypeFor[*types.ServiceNetworkConfig](): mergeServiceNetworkConfig,
|
||||
},
|
||||
}
|
||||
base := map[string]*types.ServiceNetworkConfig{
|
||||
|
||||
Reference in New Issue
Block a user