integration: modernize: any

go install golang.org/x/tools/go/analysis/passes/modernize/cmd/modernize@latest
    modernize -any -fix ./...

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn committed 2026-03-15 18:24:15 +01:00
1 parent 26c2ae5900
commit 78f40c714e
3 files changed
+5 -5

No files matched your search

@@ -145,7 +145,7 @@ func tweakContentInitFnWithDelayer(commitDelayDuration time.Duration) tweakPlugi
}
oldInitFn := p.InitFn
p.InitFn = func(ic *plugin.InitContext) (interface{}, error) {
p.InitFn = func(ic *plugin.InitContext) (any, error) {
instance, err := oldInitFn(ic)
if err != nil {
return nil, err
+1 -1
View File
@@ -405,7 +405,7 @@ var (
defaultBufSize = 1024 * 4
bufPool = sync.Pool{
New: func() interface{} {
New: func() any {
buffer := make([]byte, defaultBufSize)
return &buffer
},
+3 -3
View File
@@ -789,7 +789,7 @@ type mockPlugin struct {
closed bool
namespace string
logf func(string, ...interface{})
logf func(string, ...any)
synchronize func(*mockPlugin, []*api.PodSandbox, []*api.Container) ([]*api.ContainerUpdate, error)
runPodSandbox func(*mockPlugin, *api.PodSandbox) error
updatePodSandbox func(*mockPlugin, *api.PodSandbox, *api.LinuxResources, *api.LinuxResources) error
@@ -842,7 +842,7 @@ func (m *mockPlugin) Start() error {
}
if m.logf == nil {
m.logf = func(format string, args ...interface{}) {
m.logf = func(format string, args ...any) {
fmt.Printf(format+"\n", args...)
}
}
@@ -912,7 +912,7 @@ func (m *mockPlugin) inNamespace(namespace string) bool {
return strings.HasPrefix(namespace, m.namespace)
}
func (m *mockPlugin) Log(format string, args ...interface{}) {
func (m *mockPlugin) Log(format string, args ...any) {
m.logf(fmt.Sprintf("[plugin:%s-%s] ", m.idx, m.name)+format, args...)
}