Skip to content

Commit

Permalink
Merge pull request #215 from thaJeztah/nested_fmt
Browse files Browse the repository at this point in the history
pkg/port/socat: remove redundant sprintf
  • Loading branch information
AkihiroSuda authored Feb 15, 2021
2 parents 8efac96 + 6c7213d commit 879b9e7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/port/socat/socat.go
Original file line number Diff line number Diff line change
Expand Up @@ -164,8 +164,8 @@ func createSocatCmd(ctx context.Context, spec port.Spec, logWriter io.Writer, ch
cmd = exec.CommandContext(ctx,
"socat",
fmt.Sprintf("%s-LISTEN:%d,bind=%s,reuseaddr,fork,rcvbuf=65536,sndbuf=65536", proto, spec.ParentPort, ipStr),
fmt.Sprintf(`EXEC:"%s",nofork`,
fmt.Sprintf("nsenter -U -n --preserve-credentials -t %d socat STDIN %s4:%s", childPID, proto, hp)))
fmt.Sprintf(`EXEC:"nsenter -U -n --preserve-credentials -t %d socat STDIN %s4:%s",nofork`, childPID, proto, hp),
)

cmd.Env = os.Environ()
cmd.Stdout = logWriter
Expand Down

0 comments on commit 879b9e7

Please sign in to comment.