Open palsivertsen opened 7 years ago
Adding a handler with path "/" will result in a "http: invalid pattern " panic:
"http: invalid pattern "
package main import ( "log" "net" "github.com/dustin/go-coap" ) func main() { mux := coap.NewServeMux() mux.Handle("/", coap.FuncHandler(handler)) log.Fatal(coap.ListenAndServe("udp", ":5683", mux)) } func handler(l *net.UDPConn, a *net.UDPAddr, m *coap.Message) *coap.Message { log.Printf("%s-%d: %b", a.String(), m.MessageID, m.Payload) return nil }
Adding a handler with path "/" will result in a
"http: invalid pattern "
panic: