summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnton Luka Šijanec <anton@sijanec.eu>2024-06-06 18:30:48 +0200
committerAnton Luka Šijanec <anton@sijanec.eu>2024-06-06 18:30:48 +0200
commit4e98bda1ca75eee76e5c46d6afe803de9a7b331c (patch)
tree3eb8744f34e26570501f3f98ce256e29c181cf58
parentstrings in LDAP are case-insensitive (#8) (diff)
downloadldap-4e98bda1ca75eee76e5c46d6afe803de9a7b331c.tar
ldap-4e98bda1ca75eee76e5c46d6afe803de9a7b331c.tar.gz
ldap-4e98bda1ca75eee76e5c46d6afe803de9a7b331c.tar.bz2
ldap-4e98bda1ca75eee76e5c46d6afe803de9a7b331c.tar.lz
ldap-4e98bda1ca75eee76e5c46d6afe803de9a7b331c.tar.xz
ldap-4e98bda1ca75eee76e5c46d6afe803de9a7b331c.tar.zst
ldap-4e98bda1ca75eee76e5c46d6afe803de9a7b331c.zip
-rw-r--r--go.mod4
-rw-r--r--server.go8
2 files changed, 8 insertions, 4 deletions
diff --git a/go.mod b/go.mod
index 430dfa0..664f05b 100644
--- a/go.mod
+++ b/go.mod
@@ -1,5 +1,5 @@
-module github.com/nmcclain/ldap
+module 4a.si/ldap
-go 1.14
+go 1.22.3
require github.com/nmcclain/asn1-ber v0.0.0-20170104154839-2661553a0484
diff --git a/server.go b/server.go
index 24b1e77..434412b 100644
--- a/server.go
+++ b/server.go
@@ -180,8 +180,12 @@ func (server *Server) GetStats() Stats {
return *server.Stats
}
-func (server *Server) ListenAndServe(listenString string) error {
- ln, err := net.Listen("tcp", listenString)
+func (server *Server) ListenAndServe(listenString string, args ...string) error {
+ network := "tcp"
+ if (len(args) > 0) {
+ network = args[0]
+ }
+ ln, err := net.Listen(network, listenString)
if err != nil {
return err
}