kubo/util/util.go
Juan Batiz-Benet 4d80a2d214 key
2014-07-05 14:55:12 -07:00

34 lines
567 B
Go

package util
import (
"fmt"
"os"
)
var Debug bool
var NotImplementedError = fmt.Errorf("Error: not implemented yet.")
// a Key for maps. It's a string (rep of a multihash).
type Key string
// Shorthand printing functions.
func PErr(format string, a ...interface{}) {
fmt.Fprintf(os.Stderr, format, a...)
}
func POut(format string, a ...interface{}) {
fmt.Fprintf(os.Stdout, format, a...)
}
func DErr(format string, a ...interface{}) {
if Debug {
PErr(format, a...)
}
}
func DOut(format string, a ...interface{}) {
if Debug {
POut(format, a...)
}
}