diff --git a/server/middleware.go b/server/middleware.go index f2bf0759..63f2bc89 100644 --- a/server/middleware.go +++ b/server/middleware.go @@ -52,6 +52,7 @@ func withLogging( start := time.Now() err := handleFn(w, r) var metaErr MetaError + //nolint:gocritic // ifElseChain is not a good replacement with errors.As if errors.As(err, &metaErr) { log.Info("request", "method", r.Method, "url", r.URL, "duration", time.Since(start), "err", err, "status", w.Header().Get("status"), diff --git a/server/routing.go b/server/routing.go index edb6e5c8..86149b7b 100644 --- a/server/routing.go +++ b/server/routing.go @@ -9,11 +9,7 @@ import ( ) func (svr *Server) registerRoutes(r *mux.Router) { - r.HandleFunc("/test", func(w http.ResponseWriter, r *http.Request) { - fmt.Println("testtesttest") - }) subrouterGET := r.Methods("GET").PathPrefix("/get").Subrouter() - // simple commitments (for nitro) subrouterGET.HandleFunc("/"+ "{optional_prefix:(?:0x)?}"+ // commitments can be prefixed with 0x