<commit_before>
Router for api server of golang, on the top of [fasthttp](https://github.com/valyala/fasthttp), inspired by expressjs 

[![GoDoc](https://godoc.org/github.com/Nekle/grest?status.svg)](https://godoc.org/github.com/Nekle/grest)

## Install

```shell
go get github.com/Nekle/grest
```


## Url Pattern

```
/users
/users/:id
(/categories/:category_id)?/posts/:id
```

URL Params will be encoded in querystring, you can get values from querystring easily.  


## Use with Controller

```go
    type UserController struct {}
    
    // implement ControllerRouter Interface, then you can set route for this controller
    func (this *UserController)Route(router *grest.Router) {
        router.GET("/", this.Get) // GET /users/<commit_msg>fix url<commit_after>
Router for api server of golang, on the top of [fasthttp](https://github.com/valyala/fasthttp), inspired by expressjs 

[![GoDoc](https://godoc.org/github.com/fxding/grest?status.svg)](https://godoc.org/github.com/fxding/grest)

## Install

```shell
go get github.com/fxding/grest
```


## Url Pattern

```
/users
/users/:id
(/categories/:category_id)?/posts/:id
```

URL Params will be encoded in querystring, you can get values from querystring easily.  


## Use with Controller

```go
    type UserController struct {}
    
    // implement ControllerRouter Interface, then you can set route for this controller
    func (this *UserController)Route(router *grest.Router) {
        router.GET("/", this.Get) // GET /users/
{'fraction_non_alphanumeric': 0.14161656646626586, 'fraction_numerical': 0.0, 'mean_word_length': 3.832258064516129, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 6, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2029112', 'n_tokens_mistral': 499, 'n_tokens_neox': 474, 'n_words': 132}