https://github.com/martin3zra/router
Wrapper in top Gorilla Mux to improve the API, inspired by Laravel Frameworks
https://github.com/martin3zra/router
go golang groups middleware router
Last synced: 11 months ago
JSON representation
Wrapper in top Gorilla Mux to improve the API, inspired by Laravel Frameworks
- Host: GitHub
- URL: https://github.com/martin3zra/router
- Owner: martin3zra
- License: mit
- Created: 2020-05-31T16:08:20.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2023-04-28T11:24:52.000Z (almost 3 years ago)
- Last Synced: 2025-01-14T12:49:47.516Z (about 1 year ago)
- Topics: go, golang, groups, middleware, router
- Language: Go
- Size: 309 KB
- Stars: 1
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Router
Wrapper in top of [Gorilla Tool Kit](https://www.gorillatoolkit.org/) inspired in [Laravel Framework](https://laravel.com/docs/7.x/routing#basic-routing).
* Easy to write and read
* Route prefix
* Route group
* Middleware group
## Install
You might as well just copy the [router.go](https://github.com/martin3zra/router/blob/master/router.go) file into your own project (and the [router_test.go](https://github.com/martin3zra/router/blob/master/router_test.go) while you're at it for future generations) rather than adding a dependency.
But it is maintained as a Go module which you can get with:
```bash
go get github.com/martin3zra/router
```
## Usage
Import it:
```shell script
import (
"github.com/martin3zra/router"
)
```
The package will show you a clean way and guide you through the necessary steps to set up your routes.
