Skip to content

Commit

Permalink
Fix golangci-lint errors
Browse files Browse the repository at this point in the history
Fixes golangci-lint errors introduced by containers#258

Signed-off-by: Jake Correnti <jakecorrenti+github@proton.me>
  • Loading branch information
jakecorrenti committed Aug 17, 2023
1 parent ff26e92 commit e0d0584
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions pkg/types/command.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,11 +85,7 @@ func (c *Command) AddVfkitSocket(socket string) {
}

func (c *Command) addForwardInfo(flag, value string) {
if _, ok := c.forwardInfo[flag]; ok {
c.forwardInfo[flag] = append(c.forwardInfo[flag], value)
} else {
c.forwardInfo[flag] = []string{value}
}
c.forwardInfo[flag] = append(c.forwardInfo[flag], value)
}

func (c *Command) AddForwardSock(socket string) {
Expand Down Expand Up @@ -189,5 +185,5 @@ func (c *Command) ToCmdline() []string {
// Cmd converts Command to a commandline format and returns an exec.Cmd which
// can be executed by os/exec
func (c *Command) Cmd(gvproxyPath string) *exec.Cmd {
return exec.Command(gvproxyPath, c.ToCmdline()...)
return exec.Command(gvproxyPath, c.ToCmdline()...) // nolint:gosec
}

0 comments on commit e0d0584

Please sign in to comment.