Skip to content

Commit 3e6d2f6

Browse files
committed
Add *ln functions to feedback package
1 parent eb96078 commit 3e6d2f6

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

result/feedback/feedback.go

+12
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,12 @@ import (
2525
"github.com/sirupsen/logrus"
2626
)
2727

28+
// VerbosePrintln behaves like Println but only prints when verbosity is enabled.
29+
func VerbosePrintln(v ...interface{}) {
30+
VerbosePrint(v...)
31+
VerbosePrint("\n")
32+
}
33+
2834
// VerbosePrintf behaves like Printf but only prints when verbosity is enabled.
2935
func VerbosePrintf(format string, v ...interface{}) {
3036
VerbosePrint(fmt.Sprintf(format, v...))
@@ -37,6 +43,12 @@ func VerbosePrint(v ...interface{}) {
3743
}
3844
}
3945

46+
// Println behaves like fmt.Println but only prints when output format is set to `text`.
47+
func Println(v ...interface{}) {
48+
Print(v...)
49+
Print("\n")
50+
}
51+
4052
// Printf behaves like fmt.Printf but only prints when output format is set to `text`.
4153
func Printf(format string, v ...interface{}) {
4254
Print(fmt.Sprintf(format, v...))

0 commit comments

Comments
 (0)