Skip to content

Commit

Permalink
Fix lint issues
Browse files Browse the repository at this point in the history
  • Loading branch information
minamijoyo committed Apr 18, 2023
1 parent 8b8c496 commit 1994768
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion cmd/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ func newVersionCmd() *cobra.Command {
return cmd
}

func runVersionCmd(cmd *cobra.Command, args []string) error {
func runVersionCmd(cmd *cobra.Command, _ []string) error {
_, err := fmt.Fprintln(cmd.OutOrStdout(), Version)
return err
}
3 changes: 1 addition & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package main
import (
"fmt"
"io"
"io/ioutil"
"log"
"os"

Expand All @@ -25,7 +24,7 @@ func logOutput() io.Writer {
minLevel := os.Getenv("HCLEDIT_LOG")

// default log writer is null device.
writer := ioutil.Discard
writer := io.Discard
if minLevel != "" {
writer = os.Stderr
}
Expand Down
2 changes: 1 addition & 1 deletion main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ func argsToEnv(args []string) []string {
func envToArgs(env []string) []string {
var envvars []string

for _, kv := range os.Environ() {
for _, kv := range env {
if strings.HasPrefix(kv, VarRunMainForTestingArgPrefix) {
envvars = append(envvars, kv)
}
Expand Down

0 comments on commit 1994768

Please sign in to comment.