open-vault/vendor/github.com/go-ldap/ldap/debug.go

25 lines
390 B
Go
Raw Normal View History

2015-05-07 17:59:38 +00:00
package ldap
import (
"log"
2015-06-29 21:50:55 +00:00
"gopkg.in/asn1-ber.v1"
2015-05-07 17:59:38 +00:00
)
2017-10-27 19:06:04 +00:00
// debugging type
2015-05-07 17:59:38 +00:00
// - has a Printf method to write the debug output
type debugging bool
// write debug output
func (debug debugging) Printf(format string, args ...interface{}) {
if debug {
log.Printf(format, args...)
}
}
func (debug debugging) PrintPacket(packet *ber.Packet) {
if debug {
ber.PrintPacket(packet)
}
}