From ee4388c038f5d0912e2e2700443853308b6e621d Mon Sep 17 00:00:00 2001 From: dirkm Date: Wed, 3 Jul 2019 20:23:29 +0200 Subject: make serve function public (#4) * make serve function public * make Dn public * make attrs public --- server.go | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'server.go') diff --git a/server.go b/server.go index dcb6406..3576475 100644 --- a/server.go +++ b/server.go @@ -2,12 +2,13 @@ package ldap import ( "crypto/tls" - "github.com/nmcclain/asn1-ber" "io" "log" "net" "strings" "sync" + + "github.com/nmcclain/asn1-ber" ) type Binder interface { @@ -156,7 +157,7 @@ func (server *Server) ListenAndServeTLS(listenString string, certFile string, ke if err != nil { return err } - err = server.serve(ln) + err = server.Serve(ln) if err != nil { return err } @@ -184,14 +185,14 @@ func (server *Server) ListenAndServe(listenString string) error { if err != nil { return err } - err = server.serve(ln) + err = server.Serve(ln) if err != nil { return err } return nil } -func (server *Server) serve(ln net.Listener) error { +func (server *Server) Serve(ln net.Listener) error { newConn := make(chan net.Conn) go func() { for { -- cgit v1.2.3