mirror of https://github.com/k3s-io/k3s
36 lines
478 B
Go
36 lines
478 B
Go
package main
|
|
|
|
import (
|
|
"fmt"
|
|
"log"
|
|
|
|
"github.com/kr/pretty"
|
|
)
|
|
|
|
func debugln(a ...interface{}) (int, error) {
|
|
if debug {
|
|
return fmt.Println(a...)
|
|
}
|
|
return 0, nil
|
|
}
|
|
|
|
func verboseln(a ...interface{}) {
|
|
if verbose {
|
|
log.Println(a...)
|
|
}
|
|
}
|
|
|
|
func debugf(format string, a ...interface{}) (int, error) {
|
|
if debug {
|
|
return fmt.Printf(format, a...)
|
|
}
|
|
return 0, nil
|
|
}
|
|
|
|
func ppln(a ...interface{}) (int, error) {
|
|
if debug {
|
|
return pretty.Println(a...)
|
|
}
|
|
return 0, nil
|
|
}
|