Skip to content

Commit 4de84e4

Browse files
authored
Merge pull request #11 from SimonBaeumer/fix-golint
Fix golint
2 parents 94bfe87 + f4099f3 commit 4de84e4

File tree

3 files changed

+2
-4
lines changed

3 files changed

+2
-4
lines changed

command.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,6 @@ func WithCustomStdout(writers ...io.Writer) func(c *Command) {
8787
return func(c *Command) {
8888
writers = append(writers, &c.stdout, &c.combined)
8989
c.StdoutWriter = NewMultiplexedWriter(writers...)
90-
91-
c.StderrWriter = NewMultiplexedWriter(&c.stderr, &c.combined)
9290
}
9391
}
9492

@@ -97,8 +95,6 @@ func WithCustomStderr(writers ...io.Writer) func(c *Command) {
9795
return func(c *Command) {
9896
writers = append(writers, &c.stderr, &c.combined)
9997
c.StderrWriter = NewMultiplexedWriter(writers...)
100-
101-
c.StdoutWriter = NewMultiplexedWriter(&c.stdout, &c.combined)
10298
}
10399
}
104100

examples/standard_streams.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ package examples
22

33
import "github.com/SimonBaeumer/cmd"
44

5+
// CreateNewCommandWithStandardStream create new standard stream example
56
func CreateNewCommandWithStandardStream() {
67
c := cmd.NewCommand("echo hello; sleep 1; echo another;", cmd.WithStandardStreams)
78
c.Execute()

examples/working_dir.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ package examples
22

33
import "github.com/SimonBaeumer/cmd"
44

5+
// CreateWithWorkingDir sets the current working directory
56
func CreateWithWorkingDir() {
67
setWorkingDir := func(c *cmd.Command) {
78
c.WorkingDir = "/tmp"

0 commit comments

Comments
 (0)