Skip to content

Commit

Permalink
Renamed App.Out to App.StdOut to address comments
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnStarich committed Feb 4, 2023
1 parent 0563dc6 commit 829cd5a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions cmd/cleanenv/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ func main() {
app := App{
Args: os.Args[1:],
Env: os.Environ(),
Out: os.Stdout,
StdOut: os.Stdout,
ErrOut: os.Stderr,
}
err := app.Run()
Expand All @@ -38,9 +38,9 @@ func main() {
}

type App struct {
Args []string
Env []string
Out, ErrOut io.Writer
Args []string
Env []string
StdOut, ErrOut io.Writer
}

func (a App) Run() error {
Expand All @@ -65,7 +65,7 @@ func (a App) Run() error {
}
cmd := exec.Command(arg0, argv...)
cmd.Env = cleanEnv
cmd.Stdout = a.Out
cmd.Stdout = a.StdOut
cmd.Stderr = a.ErrOut
return cmd.Run()
}
Expand Down
2 changes: 1 addition & 1 deletion cmd/cleanenv/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ func TestRun(t *testing.T) {
app := App{
Args: tc.args,
Env: tc.env,
Out: &output,
StdOut: &output,
ErrOut: &output,
}
err := app.Run()
Expand Down

0 comments on commit 829cd5a

Please sign in to comment.