1
0
Fork 0

hswaw/capacifier: remove mirko dependency

Change-Id: I3afbe1857c321ac6db1255d8a2fe1d9aa3da5c12
Reviewed-on: https://gerrit.hackerspace.pl/c/hscloud/+/1689
Reviewed-by: q3k <q3k@hackerspace.pl>
master
radex 2023-10-09 00:01:51 +02:00
parent 3ca8454555
commit d318d7e6d4
2 changed files with 4 additions and 12 deletions

View File

@ -7,7 +7,6 @@ go_library(
importpath = "code.hackerspace.pl/hscloud/hswaw/capacifier", importpath = "code.hackerspace.pl/hscloud/hswaw/capacifier",
visibility = ["//visibility:private"], visibility = ["//visibility:private"],
deps = [ deps = [
"//go/mirko",
"@com_github_go_ldap_ldap_v3//:ldap", "@com_github_go_ldap_ldap_v3//:ldap",
"@com_github_golang_glog//:glog", "@com_github_golang_glog//:glog",
], ],

View File

@ -1,6 +1,7 @@
package main package main
import ( import (
"context"
"crypto/tls" "crypto/tls"
"flag" "flag"
"fmt" "fmt"
@ -11,8 +12,6 @@ import (
ldap "github.com/go-ldap/ldap/v3" ldap "github.com/go-ldap/ldap/v3"
"github.com/golang/glog" "github.com/golang/glog"
"code.hackerspace.pl/hscloud/go/mirko"
) )
type server struct { type server struct {
@ -179,10 +178,8 @@ func main() {
glog.Exitf("-ldap_bind_pw must be set") glog.Exitf("-ldap_bind_pw must be set")
} }
m := mirko.New() // TODO(q3k): use sigint-interruptible context
if err := m.Listen(); err != nil { ctx := context.Background()
glog.Exitf("Listen(): %v", err)
}
s := &server{} s := &server{}
mux := http.NewServeMux() mux := http.NewServeMux()
@ -195,9 +192,5 @@ func main() {
} }
}() }()
if err := m.Serve(); err != nil { <-ctx.Done()
glog.Exitf("Serve(): %v", err)
}
<-m.Done()
} }