From 58358ddd7cd0152bf16a7326e1d595524fb51246 Mon Sep 17 00:00:00 2001 From: Christopher Speller Date: Tue, 8 Dec 2015 13:38:43 -0500 Subject: Some refactoring --- .../src/github.com/go-ldap/ldap/debug.go | 24 ++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 Godeps/_workspace/src/github.com/go-ldap/ldap/debug.go (limited to 'Godeps/_workspace/src/github.com/go-ldap/ldap/debug.go') diff --git a/Godeps/_workspace/src/github.com/go-ldap/ldap/debug.go b/Godeps/_workspace/src/github.com/go-ldap/ldap/debug.go new file mode 100644 index 000000000..b8a7ecbff --- /dev/null +++ b/Godeps/_workspace/src/github.com/go-ldap/ldap/debug.go @@ -0,0 +1,24 @@ +package ldap + +import ( + "log" + + "gopkg.in/asn1-ber.v1" +) + +// debbuging type +// - 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) + } +} -- cgit v1.2.3-1-g7c22