• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

go-pkgz / routegroup / 14037452813
98%

Build:
DEFAULT BRANCH: master
Ran 24 Mar 2025 04:23PM UTC
Jobs 1
Files 1
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

24 Mar 2025 02:02PM UTC coverage: 100.0%. Remained the same
14037452813

Pull #17

github

hlidotbe
Add support for "path-less" patterns

This add support for patterns without path. When using the pattern {$} the
path will be set to an empty string. This allows to handle a mounted group
root url without trailing slash.

For example:
     	router := routegroup.New(mux)
     	usersGroup := router.Mount("/api/v1/users")
        usersGroup.Use(middleware1, middleware2)
     	usersGroup.Handle("{$}", handler) // this will handle /api/v1/users
     	usersGroup.Handle("/new", handler) // this will handle /api/v1/users/new

Without this, you need to regsiter the "root" handler on the parent
group and explicitly add middlewares/... to the path. Like this:

     	router := routegroup.New(mux)
     	router.With(middleware1, middleware2).Handle("/api/v1/users", handler)
     	usersGroup := router.Mount("/api/v1/users")
        usersGroup.Use(middleware1, middleware2)
     	usersGroup.Handle("/new", handler) // this will handle /api/v1/users/new

Lowering readability and maintainability.
Pull Request #17: Add support for "path-less" patterns

115 of 115 relevant lines covered (100.0%)

23.75 hits per line

Jobs
ID Job ID Ran Files Coverage
1 14037452813.1 24 Mar 2025 04:23PM UTC 1
100.0
GitHub Action Run
Source Files on build 14037452813
  • Tree
  • List 1
  • Changed 1
  • Source Changed 0
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Pull Request #17
  • PR Base - master (#12955770983)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc