Skip to content

Commit

Permalink
Merge pull request #11 from SimonBaeumer/fix-golint
Browse files Browse the repository at this point in the history
Fix golint
  • Loading branch information
SimonBaeumer committed Oct 24, 2019
2 parents 94bfe87 + f4099f3 commit 4de84e4
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 4 deletions.
4 changes: 0 additions & 4 deletions command.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,6 @@ func WithCustomStdout(writers ...io.Writer) func(c *Command) {
return func(c *Command) {
writers = append(writers, &c.stdout, &c.combined)
c.StdoutWriter = NewMultiplexedWriter(writers...)

c.StderrWriter = NewMultiplexedWriter(&c.stderr, &c.combined)
}
}

Expand All @@ -97,8 +95,6 @@ func WithCustomStderr(writers ...io.Writer) func(c *Command) {
return func(c *Command) {
writers = append(writers, &c.stderr, &c.combined)
c.StderrWriter = NewMultiplexedWriter(writers...)

c.StdoutWriter = NewMultiplexedWriter(&c.stdout, &c.combined)
}
}

Expand Down
1 change: 1 addition & 0 deletions examples/standard_streams.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package examples

import "github.com/SimonBaeumer/cmd"

// CreateNewCommandWithStandardStream create new standard stream example
func CreateNewCommandWithStandardStream() {
c := cmd.NewCommand("echo hello; sleep 1; echo another;", cmd.WithStandardStreams)
c.Execute()
Expand Down
1 change: 1 addition & 0 deletions examples/working_dir.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package examples

import "github.com/SimonBaeumer/cmd"

// CreateWithWorkingDir sets the current working directory
func CreateWithWorkingDir() {
setWorkingDir := func(c *cmd.Command) {
c.WorkingDir = "/tmp"
Expand Down

0 comments on commit 4de84e4

Please sign in to comment.