commander-cli/cmd

View on GitHub

Showing 2 of 2 total issues

Similar blocks of code found in 2 locations. Consider refactoring.
Open

func WithCustomStdout(writers ...io.Writer) func(c *Command) {
return func(c *Command) {
writers = append(writers, &c.stdout, &c.combined)
c.StdoutWriter = io.MultiWriter(writers...)
}
Severity: Minor
Found in command.go and 1 other location - About 30 mins to fix
command.go on lines 128..133

Similar blocks of code found in 2 locations. Consider refactoring.
Open

func WithCustomStderr(writers ...io.Writer) func(c *Command) {
return func(c *Command) {
writers = append(writers, &c.stderr, &c.combined)
c.StderrWriter = io.MultiWriter(writers...)
}
Severity: Minor
Found in command.go and 1 other location - About 30 mins to fix
command.go on lines 120..125
Severity
Category
Status
Source
Language