You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

24 lines
390 B

  1. package ldap
  2. import (
  3. "log"
  4. "gopkg.in/asn1-ber.v1"
  5. )
  6. // debbuging type
  7. // - has a Printf method to write the debug output
  8. type debugging bool
  9. // write debug output
  10. func (debug debugging) Printf(format string, args ...interface{}) {
  11. if debug {
  12. log.Printf(format, args...)
  13. }
  14. }
  15. func (debug debugging) PrintPacket(packet *ber.Packet) {
  16. if debug {
  17. ber.PrintPacket(packet)
  18. }
  19. }