Skip to content

Commit

Permalink
style: fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
samlaf committed Oct 15, 2024
1 parent 1d5cd64 commit 6d85159
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
1 change: 1 addition & 0 deletions server/middleware.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"),
Expand Down
4 changes: 0 additions & 4 deletions server/routing.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 6d85159

Please sign in to comment.