Skip to content

Commit 56f5e6b

Browse files
committed
small adjustment to some comments
1 parent 192508d commit 56f5e6b

File tree

2 files changed

+5
-8
lines changed

2 files changed

+5
-8
lines changed

commands/commands_test.go

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,11 +47,6 @@ import (
4747
"github.com/stretchr/testify/require"
4848
)
4949

50-
/*
51-
NOTE: the use of func init() for test is discouraged, please create public InitFunctions and call them,
52-
or use (untested) cmd.PersistentPreRun or cmd.PreRun to reinitialize the flags and the commands every time.
53-
*/
54-
5550
// Utility functions
5651

5752
// Redirecting stdOut so we can analyze output line by

commands/root/root.go

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -125,9 +125,11 @@ var Command = &cobra.Command{
125125

126126
func preRun(cmd *cobra.Command, args []string) {
127127
// Reset logrus if debug flag changed.
128-
if !commands.GlobalFlags.Debug { // Discard logrus output if no debug.
129-
logrus.SetOutput(ioutil.Discard) // For standard logger.
130-
} else { // Else print on stderr.
128+
if !commands.GlobalFlags.Debug {
129+
// Discard logrus output if no debug.
130+
logrus.SetOutput(ioutil.Discard)
131+
} else {
132+
// Else print on stderr.
131133
commands.ErrLogrus.Out = os.Stderr
132134
formatter.SetLogger(commands.ErrLogrus)
133135
}

0 commit comments

Comments
 (0)