Skip to content

Commit

Permalink
lint: simplify dbl quotes code
Browse files Browse the repository at this point in the history
  • Loading branch information
umputun committed May 12, 2023
1 parent c371670 commit 9613ba1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/config/command.go
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ func (cmd *Cmd) scriptFile(inp string) (r io.Reader) {
func (cmd *Cmd) genEnv() []string {
envs := make([]string, 0, len(cmd.Environment))
for k, v := range cmd.Environment {
envs = append(envs, fmt.Sprintf("%s=\"%s\"", k, v))
envs = append(envs, fmt.Sprintf("%s=%q", k, v))
}
sort.Slice(envs, func(i, j int) bool { return envs[i] < envs[j] })
return envs
Expand All @@ -209,7 +209,7 @@ func (cmd *Cmd) getSecrets() []string {
secrets := []string{}
for _, k := range cmd.Options.Secrets {
if v := cmd.Secrets[k]; v != "" {
secrets = append(secrets, fmt.Sprintf("%s=\"%s\"", k, v))
secrets = append(secrets, fmt.Sprintf("%s=%q", k, v))
}
}
sort.Slice(secrets, func(i, j int) bool { return secrets[i] < secrets[j] })
Expand Down

0 comments on commit 9613ba1

Please sign in to comment.