mirror of
https://github.com/go-task/task.git
synced 2025-12-23 06:59:23 +01:00
add verbose mode (-v flag)
This commit is contained in:
12
log.go
12
log.go
@@ -11,3 +11,15 @@ func (e *Executor) println(args ...interface{}) {
|
||||
func (e *Executor) printfln(format string, args ...interface{}) {
|
||||
fmt.Fprintf(e.Stdout, format+"\n", args...)
|
||||
}
|
||||
|
||||
func (e *Executor) verbosePrintln(args ...interface{}) {
|
||||
if e.Verbose {
|
||||
e.println(args...)
|
||||
}
|
||||
}
|
||||
|
||||
func (e *Executor) verbosePrintfln(format string, args ...interface{}) {
|
||||
if e.Verbose {
|
||||
e.printfln(format, args...)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user