From 59a7c7c5a530cead1905c0c686869ea0f6a7949c Mon Sep 17 00:00:00 2001 From: Unknwon Date: Sun, 7 Sep 2014 20:04:47 -0400 Subject: Remove ldap dep --- modules/ldap/debug.go | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 modules/ldap/debug.go (limited to 'modules/ldap/debug.go') diff --git a/modules/ldap/debug.go b/modules/ldap/debug.go new file mode 100644 index 00000000..8653a47b --- /dev/null +++ b/modules/ldap/debug.go @@ -0,0 +1,24 @@ +package ldap + +import ( + "log" + + "github.com/gogits/gogs/modules/asn1-ber" +) + +// 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