fix: enable lll linter and format long function signatures

Previously lll linter was configured to .golangci.yml but with
a typo in the directive ('linter-settings', not 'linters-settings').

Enable line length linter and fix long lines by breaking function
signatures across multiple lines in exec.go, attach.go, and resource.go.

Signed-off-by: Ville Vesilehto <ville@vesilehto.fi>
This commit is contained in:
Ville Vesilehto
2025-02-01 08:06:13 +02:00
committed by Pires
parent 5c534ffcd6
commit ca78265381
4 changed files with 30 additions and 7 deletions

View File

@@ -95,7 +95,16 @@ type containerAttachContext struct {
// AttachToContainer Implements remotecommand.Attacher
// This is called by remotecommand.ServeAttach
func (c *containerAttachContext) AttachToContainer(name string, uid types.UID, container string, in io.Reader, out, err io.WriteCloser, tty bool, resize <-chan remoteutils.TerminalSize, timeout time.Duration) error {
func (c *containerAttachContext) AttachToContainer(
name string,
uid types.UID,
container string,
in io.Reader,
out, err io.WriteCloser,
tty bool,
resize <-chan remoteutils.TerminalSize,
timeout time.Duration,
) error {
eio := &execIO{
tty: tty,

View File

@@ -171,7 +171,17 @@ type containerExecContext struct {
// ExecInContainer Implements remotecommand.Executor
// This is called by remotecommand.ServeExec
func (c *containerExecContext) ExecInContainer(name string, uid types.UID, container string, cmd []string, in io.Reader, out, err io.WriteCloser, tty bool, resize <-chan remoteutils.TerminalSize, timeout time.Duration) error {
func (c *containerExecContext) ExecInContainer(
name string,
uid types.UID,
container string,
cmd []string,
in io.Reader,
out, err io.WriteCloser,
tty bool,
resize <-chan remoteutils.TerminalSize,
timeout time.Duration,
) error {
eio := &execIO{
tty: tty,