http.Error(w, fmt.Sprintf("failed to reload config: %s", err), http.StatusInternalServerError)
}
})
- http.Handle("/metrics", prometheus.Handler())
+ http.Handle("/metrics", promhttp.Handler())
http.HandleFunc("/probe", func(w http.ResponseWriter, r *http.Request) {
sc.Lock()
conf := sc.C
go func() {
conn, err := ln.Accept()
if err != nil {
- t.Fatalf("Error accepting on socket: %s", err)
+ panic(fmt.Sprintf("Error accepting on socket: %s", err))
}
conn.Close()
ch <- struct{}{}
go func() {
conn, err := ln.Accept()
if err != nil {
- t.Fatalf("Error accepting on socket: %s", err)
+ panic(fmt.Sprintf("Error accepting on socket: %s", err))
}
fmt.Fprintf(conn, ":ircd.localhost NOTICE AUTH :*** Looking up your hostname...\n")
var nick, user, mode, unused, realname string
go func() {
conn, err := ln.Accept()
if err != nil {
- t.Fatalf("Error accepting on socket: %s", err)
+ panic(fmt.Sprintf("Error accepting on socket: %s", err))
}
fmt.Fprintf(conn, ":ircd.localhost NOTICE AUTH :*** Looking up your hostname...\n")
var nick, user, mode, unused, realname string
go func() {
conn, err := ln.Accept()
if err != nil {
- t.Fatalf("Error accepting on socket: %s", err)
+ panic(fmt.Sprintf("Error accepting on socket: %s", err))
}
conn.SetDeadline(time.Now().Add(1 * time.Second))
fmt.Fprintf(conn, "SSH-2.0-OpenSSH_6.9p1 Debian-2\n")
go func() {
conn, err := ln.Accept()
if err != nil {
- t.Fatalf("Error accepting on socket: %s", err)
+ panic(fmt.Sprintf("Error accepting on socket: %s", err))
}
conn.Close()
ch <- struct{}{}