mirror of
https://github.com/replicatedhq/troubleshoot.git
synced 2026-02-14 18:29:53 +00:00
26 lines
341 B
Go
26 lines
341 B
Go
package debug
|
|
|
|
import (
|
|
"log"
|
|
|
|
"github.com/spf13/viper"
|
|
)
|
|
|
|
func Print(v ...interface{}) {
|
|
if viper.GetBool("debug") {
|
|
log.Print(v...)
|
|
}
|
|
}
|
|
|
|
func Printf(format string, v ...interface{}) {
|
|
if viper.GetBool("debug") {
|
|
log.Printf(format, v...)
|
|
}
|
|
}
|
|
|
|
func Println(v ...interface{}) {
|
|
if viper.GetBool("debug") {
|
|
log.Println(v...)
|
|
}
|
|
}
|