Skip to content

Commit eb96078

Browse files
committed
Change parameter of feedback package functions to variadic interface
Even though not currently needed, this brings consistency with the standard fmt API.
1 parent 2145f35 commit eb96078

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

result/feedback/feedback.go

+7-7
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,9 @@ func VerbosePrintf(format string, v ...interface{}) {
3131
}
3232

3333
// VerbosePrint behaves like Print but only prints when verbosity is enabled.
34-
func VerbosePrint(message string) {
34+
func VerbosePrint(v ...interface{}) {
3535
if configuration.Verbose() && (configuration.OutputFormat() == outputformat.Text) {
36-
Printf(message)
36+
Print(v...)
3737
}
3838
}
3939

@@ -43,9 +43,9 @@ func Printf(format string, v ...interface{}) {
4343
}
4444

4545
// Print behaves like fmt.Print but only prints when output format is set to `text`.
46-
func Print(message string) {
46+
func Print(v ...interface{}) {
4747
if configuration.OutputFormat() == outputformat.Text {
48-
fmt.Printf(message)
48+
fmt.Print(v...)
4949
}
5050
}
5151

@@ -55,7 +55,7 @@ func Errorf(format string, v ...interface{}) {
5555
}
5656

5757
// Error behaves like fmt.Print but adds a newline and also logs the error.
58-
func Error(errorMessage string) {
59-
fmt.Fprintln(os.Stderr, errorMessage)
60-
logrus.Error(fmt.Sprint(errorMessage))
58+
func Error(v ...interface{}) {
59+
fmt.Fprintln(os.Stderr, v...)
60+
logrus.Error(fmt.Sprint(v...))
6161
}

0 commit comments

Comments
 (0)