gopkg.in/tools/godep.v35@v35.0.0-20151212003741-483cb8869554/msg.go (about) 1 package main 2 3 import ( 4 "fmt" 5 6 "github.com/tools/godep/Godeps/_workspace/src/github.com/kr/pretty" 7 ) 8 9 func debugln(a ...interface{}) (int, error) { 10 if debug { 11 return fmt.Println(a...) 12 } 13 return 0, nil 14 } 15 16 func debugf(format string, a ...interface{}) (int, error) { 17 if debug { 18 return fmt.Printf(format, a...) 19 } 20 return 0, nil 21 } 22 23 func pp(a ...interface{}) (int, error) { 24 if debug { 25 return pretty.Print(a...) 26 } 27 return 0, nil 28 } 29 30 func ppln(a ...interface{}) (int, error) { 31 if debug { 32 return pretty.Println(a...) 33 } 34 return 0, nil 35 } 36 37 func ppf(format string, a ...interface{}) (int, error) { 38 if debug { 39 return pretty.Printf(format, a...) 40 } 41 return 0, nil 42 }