cleanup: address golangci 'funcorder' linter problems

The new 'funcorder' linter expects all public functions to be placed
before private functions of a struct. Many private functions needed
moving further down into their files.

Some files had many issues reported. To reduce the churn in those files,
they have been annotated with a `//nolint:funcorder` comment.

Signed-off-by: Niels de Vos <ndevos@ibm.com>
This commit is contained in:
Niels de Vos
2025-04-29 11:32:43 +02:00
committed by mergify[bot]
parent 0907f39d95
commit 0a22e3a186
29 changed files with 921 additions and 914 deletions

View File

@ -108,6 +108,15 @@ func (cas *CSIAddonsServer) Start(middlewareConfig csicommon.MiddlewareServerOpt
return nil
}
// Stop can be used to stop the internal gRPC server.
func (cas *CSIAddonsServer) Stop() {
if cas.server == nil {
return
}
cas.server.GracefulStop()
}
// serve starts the actual process of listening for requests on the gRPC
// server. This is a blocking call, so it should get executed in a go-routine.
func (cas *CSIAddonsServer) serve(listener net.Listener) {
@ -121,12 +130,3 @@ func (cas *CSIAddonsServer) serve(listener net.Listener) {
log.DefaultLog("the CSI-Addons server at %q has been stopped", listener.Addr())
}
// Stop can be used to stop the internal gRPC server.
func (cas *CSIAddonsServer) Stop() {
if cas.server == nil {
return
}
cas.server.GracefulStop()
}