forked from tools/godep
-
Notifications
You must be signed in to change notification settings - Fork 0
/
msg.go
55 lines (46 loc) · 848 Bytes
/
msg.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
package main
import (
"fmt"
"log"
"github.com/tools/godep/Godeps/_workspace/src/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 verbosef(format string, a ...interface{}) {
if verbose {
log.Printf(format, a...)
}
}
func pp(a ...interface{}) (int, error) {
if debug {
return pretty.Print(a...)
}
return 0, nil
}
func ppln(a ...interface{}) (int, error) {
if debug {
return pretty.Println(a...)
}
return 0, nil
}
func ppf(format string, a ...interface{}) (int, error) {
if debug {
return pretty.Printf(format, a...)
}
return 0, nil
}