Skip to content

Commit 19ac18b

Browse files
committed
Update golangci-lint to v1.62.0
Signed-off-by: Sascha Grunert <[email protected]>
1 parent 9dc63d1 commit 19ac18b

File tree

10 files changed

+14
-9
lines changed

10 files changed

+14
-9
lines changed

.github/workflows/verify.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ on:
1111
pull_request:
1212
env:
1313
GO_VERSION: "1.23"
14-
GOLANGCI_LINT_VERSION: v1.61.0
14+
GOLANGCI_LINT_VERSION: v1.62.0
1515
permissions:
1616
contents: read
1717

.golangci.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ linters:
5252
- gosmopolitan
5353
- govet
5454
- grouper
55+
- iface
5556
- importas
5657
- ineffassign
5758
- intrange
@@ -69,6 +70,7 @@ linters:
6970
- promlinter
7071
- protogetter
7172
- reassign
73+
- recvcheck
7274
- revive
7375
- rowserrcheck
7476
- sloglint

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ GO_MD2MAN ?= ${BUILD_BIN_PATH}/go-md2man
4848
GINKGO := ${BUILD_BIN_PATH}/ginkgo
4949
MOCKGEN := ${BUILD_BIN_PATH}/mockgen
5050
GOLANGCI_LINT := ${BUILD_BIN_PATH}/golangci-lint
51-
GOLANGCI_LINT_VERSION := v1.61.0
51+
GOLANGCI_LINT_VERSION := v1.62.0
5252
GO_MOD_OUTDATED := ${BUILD_BIN_PATH}/go-mod-outdated
5353
GO_MOD_OUTDATED_VERSION := 0.9.0
5454
GOSEC := ${BUILD_BIN_PATH}/gosec

dependencies.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ dependencies:
1818
match: buildGo123Module
1919

2020
- name: golangci-lint
21-
version: v1.61.0
21+
version: v1.62.0
2222
refPaths:
2323
- path: .github/workflows/verify.yml
2424
match: GOLANGCI_LINT_VERSION

internal/runtimehandlerhooks/runtime_handler_hooks.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,15 @@ var (
1515
cpuLoadBalancingAllowedAnywhere bool
1616
)
1717

18+
//nolint:iface // interface duplication is intentional
1819
type RuntimeHandlerHooks interface {
1920
PreCreate(ctx context.Context, specgen *generate.Generator, s *sandbox.Sandbox, c *oci.Container) error
2021
PreStart(ctx context.Context, c *oci.Container, s *sandbox.Sandbox) error
2122
PreStop(ctx context.Context, c *oci.Container, s *sandbox.Sandbox) error
2223
PostStop(ctx context.Context, c *oci.Container, s *sandbox.Sandbox) error
2324
}
2425

26+
//nolint:iface // interface duplication is intentional
2527
type HighPerformanceHook interface {
2628
RuntimeHandlerHooks
2729
}

server/container_attach.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ func (s *Server) Attach(ctx context.Context, req *types.AttachRequest) (*types.A
2525
}
2626

2727
// Attach endpoint for streaming.Runtime.
28-
func (s StreamService) Attach(ctx context.Context, containerID string, inputStream io.Reader, outputStream, errorStream io.WriteCloser, tty bool, resizeChan <-chan remotecommand.TerminalSize) error {
28+
func (s *StreamService) Attach(ctx context.Context, containerID string, inputStream io.Reader, outputStream, errorStream io.WriteCloser, tty bool, resizeChan <-chan remotecommand.TerminalSize) error {
2929
ctx, span := log.StartSpan(ctx)
3030
defer span.End()
3131
c, err := s.runtimeServer.GetContainerFromShortID(ctx, containerID)

server/container_exec.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ func (s *Server) Exec(ctx context.Context, req *types.ExecRequest) (*types.ExecR
2626
}
2727

2828
// Exec endpoint for streaming.Runtime.
29-
func (s StreamService) Exec(ctx context.Context, containerID string, cmd []string, stdin io.Reader, stdout, stderr io.WriteCloser, tty bool, resizeChan <-chan remotecommand.TerminalSize) error {
29+
func (s *StreamService) Exec(ctx context.Context, containerID string, cmd []string, stdin io.Reader, stdout, stderr io.WriteCloser, tty bool, resizeChan <-chan remotecommand.TerminalSize) error {
3030
ctx, span := log.StartSpan(ctx)
3131
defer span.End()
3232
c, err := s.runtimeServer.GetContainerFromShortID(ctx, containerID)

server/container_portforward.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ func (s *Server) PortForward(ctx context.Context, req *types.PortForwardRequest)
2222
return resp, nil
2323
}
2424

25-
func (s StreamService) PortForward(ctx context.Context, podSandboxID string, port int32, stream io.ReadWriteCloser) error {
25+
func (s *StreamService) PortForward(ctx context.Context, podSandboxID string, port int32, stream io.ReadWriteCloser) error {
2626
ctx, span := log.StartSpan(ctx)
2727
defer span.End()
2828

server/server.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ type StreamService struct {
6464
// Server implements the RuntimeService and ImageService.
6565
type Server struct {
6666
config libconfig.Config
67-
stream StreamService
67+
stream *StreamService
6868
hostportManager hostport.HostPortManager
6969

7070
*lib.ContainerServer
@@ -405,6 +405,7 @@ func New(
405405
ContainerServer: containerServer,
406406
hostportManager: hostportManager,
407407
config: *config,
408+
stream: &StreamService{},
408409
monitorsChan: make(chan struct{}),
409410
defaultIDMappings: idMappings,
410411
minimumMappableUID: config.MinimumMappableUID,

server/suite_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ var (
5353
testManifest []byte
5454
testPath string
5555
testSandbox *sandbox.Sandbox
56-
testStreamService server.StreamService
56+
testStreamService *server.StreamService
5757

5858
emptyDir string
5959
)
@@ -171,7 +171,7 @@ var beforeEach = func() {
171171

172172
// Initialize test streaming server
173173
streamServerConfig := streaming.DefaultConfig
174-
testStreamService = server.StreamService{}
174+
testStreamService = &server.StreamService{}
175175
testStreamService.SetRuntimeServer(sut)
176176
server, err := streaming.NewServer(streamServerConfig, testStreamService)
177177
Expect(err).ToNot(HaveOccurred())

0 commit comments

Comments
 (0)