• Stars
    star
    22
  • Rank 1,013,670 (Top 21 %)
  • Language
    Go
  • License
    BSD 3-Clause "New...
  • Created over 6 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

FastRouter is a fast, flexible HTTP router written in Go.

FastRouter

FastRouter is a fast, flexible HTTP router written in Go.

FastRouter contains some customizable options, such as TrailingSlashesPolicy, PanicHandler, OptionsHandler, MethodNotAllowedHandler, NotFoundHandler and so on.

FastRouter also provides some useful features, such as grouping and middleware.

GoDoc Build Status Go Report Card Coverage Status

Features

Fast: See Go Web Framework Benchmark

Flexible: FastRouter provides some customizable options for you:

  • TrailingSlashesPolicy:
    • IgnoreTrailingSlashes: ignore trailing slashes.
    • AppendTrailingSlashes: append trailing slashes and redirect if request path is not end with '/'.
    • RemoveTrailingSlashes: remove trailing slashes and redirect if request path is end with '/'.
    • StrictTrailingSlashes: remove or append trailing slashes according to corresponding pattern.
  • PanicHandler
  • OptionsHandler
  • MethodNotAllowedHandler
  • NotFoundHandler

Compatible: FastRouter is an implementation of http.Handler, so it is compatible with third-party packages.

Middleware: Middleware is a chaining tool for chaining http.Handler, see Middleware.

Grouping: Grouping is an useful feature of FastRouter, it allows to nest and specify middleware of group, see Grouping.

Documentation

See Documentation for details.

Examples

See Examples for details.

More Repositories

1

hugo-theme-bootstrap

A fast, responsive, multipurpose and feature-rich Hugo theme.
HTML
362
star
2

hugo-theme-bootstrap-skeleton

The starter template of Hugo Bootstrap Theme.
Dockerfile
47
star
3

clevergo-examples

⚡ CleverGo Examples
Go
40
star
4

yii2-app-template

Yii2 App Project Template
PHP
25
star
5

yii2-vue-admin

Yii2 Vue Admin Template
Vue
22
star
6

archlinux-wechat-devtool

微信开发者工具 for Arch Linux
Shell
19
star
7

gopkgs

An HTTP service for customizing import path of your Go packages.
Go
17
star
8

caddy-dnspodcn

Caddy2 DNSPod.cn DNS Provider 模块
Go
12
star
9

hugo-mod-search

A powerful, flexible and responsive Hugo client side fuzzy search module.
TypeScript
12
star
10

yii2-rate-limiter

Yii2 Rate Limiter
PHP
9
star
11

php-opencc

OpenCC PHP 简繁体转换库
PHP
8
star
12

blog

Razon Yang's personnal blog built on top of Hugo and the HBS theme
HTML
8
star
13

docker-php-cron

PHP Cron Docker Image
Dockerfile
8
star
14

gopencc

Go 语言编写的简繁体转换命令行工具,支持词汇级别的转换、异体字转换和地区习惯用词转换(中国大陆、臺湾、香港、日本新字体)。
Go
8
star
15

yii2-flysystem-aliyun-oss

Aliyun OSS Adapter for Yii2 Flysystem
PHP
7
star
16

routing

A fast, flexible and scalable HTTP router for PHP.
PHP
7
star
17

hb

Moved to https://github.com/hbstack.
SCSS
7
star
18

php-token-bucket

PHP Token Bucket for HTTP rate limiter
PHP
6
star
19

composer-mirrors

Packagist/Composer Mirrors
6
star
20

yii2-uploader

Yii2 File Uploader
PHP
6
star
21

php-template

PHP template
5
star
22

psr-rate-limiter

PSR 15 Rate Limiter Middleware
PHP
5
star
23

hugo-mod-seo

Hugo SEO Module
HTML
5
star
24

yii2-jsend

JSend formatter, serializer and error handler for Yii2
PHP
5
star
25

yii2-setting

Yii2 Setting Manager
PHP
5
star
26

php-jsend

Jsend port for PHP
PHP
5
star
27

yii2-extension-template

Yii2 Extensions Template
PHP
5
star
28

yii2-log-target-db

Yii2 enhanced database log target
PHP
5
star
29

yii2-psr-log

Yii2 PSR Logger Adapter
PHP
5
star
30

hugo-mod-icons

Hugo SVG Icons Module
HTML
4
star
31

hugo-mod-gravatar

Hugo Gravatar Module
HTML
4
star
32

php-routing

A fast, flexible and scalable HTTP router for PHP.
PHP
4
star
33

go-auth0-web-app

Auth0 Integration Samples for Go Web Applications
Go
4
star
34

hellogo

Go
4
star
35

hugo-mod-utterances

Hugo Utterances Comments Engine Module
HTML
3
star
36

hugo-mod-bootstrap

Hugo Bootstrap Module
HTML
3
star
37

hugo-mod-idb

Hugo IndexedDB Module
3
star
38

hugo-mod-fuse-js

Hugo Fuse.js Module
3
star
39

hugo-mod-workbox

Hugo WorkBox Module
3
star
40

hugo-mod-pwa

Hugo PWA Module
HTML
3
star
41

docker-hugo

Hugo Docker Image
Dockerfile
3
star
42

hugo-mod-font-awesome-svg-js

Hugo Font Awesome SVG JS Module
HTML
3
star
43

api

My Public APIs
Go
3
star
44

hugo-theme-bootstrap-algolia-action

HBS Algolia GitHub Action
Shell
3
star
45

hb-mermaid

The Mermaid Module for Hugo Bootstrap framework (HB)
SCSS
3
star
46

hugo-theme-bootstrap-algolia

A CLI tool for HBS theme to upload Algolia index file.
Go
3
star
47

php-opencc-demo

Just a demo.
CSS
3
star
48

swoole-unit

The unit test helpers for Swoole
PHP
2
star
49

hugo-mod-base

The basic and useful partials and functions for Hugo theme developers.
HTML
2
star
50

hugo-mod-code-block-panel

Hugo Code Block Panel Module
TypeScript
2
star
51

template-hugopress-mod

Hugo Module Template
HTML
2
star
52

hugo-mod-giscus

Hugo Giscus Comments Engine Module
HTML
2
star
53

hugopress

Pluggable and UI less Hugo modules framework.
HTML
2
star
54

hugo-mod-i18n-js

A i18n JS Module for Hugo
TypeScript
2
star
55

hb-site

The offcial site of Hugo Bootstrap framework.
HTML
2
star
56

docker-images

Docker Images
Dockerfile
2
star
57

yii-log

Enhanced DB Target for Yii2 Log Component
PHP
2
star
58

go-algorithm

Algorithm implementations written in Go
Go
2
star
59

hb-footer

The universal footer for Hugo Bootstrap framework (HB)
HTML
2
star
60

hugo-mod-mermaid

Hugo Mermaid Module
HTML
2
star
61

hugo-mod-icons-simple-icons

Hugo Simple Icons Module
2
star
62

hugo-mod-google-adsense

Hugo Google Adsense Module
HTML
2
star
63

psr7-swoole

The PSR7 helpers for Swoole.
PHP
2
star
64

hb-theme

Moved to https://github.com/hbstack/theme
1
star
65

hugo-theme-bootstrap-comments

1
star
66

go-radix-tree

Radix tree implementations written in Go
Go
1
star
67

yii-resource-storage

Static Resource Storage for Yii framework
PHP
1
star
68

hb-blog

The universal blog module for Hugo Bootstrap framework (HB)
HTML
1
star
69

hb-panel

1
star
70

websocket-protocol

WebSocket协议译文
GCC Machine Description
1
star
71

hb-bootstrap

HB Bootstrap Module
TypeScript
1
star
72

hb-disqus

HB Disqus Module
TypeScript
1
star
73

template-hb-mod

Hugo Bootstrap Framework Module Project Template
1
star
74

zig-examples

Zig
1
star
75

hugo-shortcode-bootstrap

Bootstrap shortcodes for Hugo
1
star
76

hugo-mod-snackbar

TypeScript
1
star
77

yii-runner-swoole

Yii Swoole Application Runner
PHP
1
star
78

hb-code-block-panel

HB Code Block Panel Module
SCSS
1
star
79

config

My configurations
Shell
1
star
80

hb-heading-sign

HB Heading Sign Module
TypeScript
1
star
81

php-unit-helper

PHP helper for unit testing
PHP
1
star
82

hugo-mod-icons-font-awesome

Hugo Font Awesome Icons Module
1
star
83

hugo-theme-bootstrap-staticman

A HBS demo with Staticman comments engine.
Dockerfile
1
star
84

hugo-mod-html

Hugo HTML Module
HTML
1
star
85

hb-mod-thanks

HTML
1
star
86

hb-snackbar

SCSS
1
star
87

hb-back-to-top

The back to top module for Hugo Bootstrap framework (HB)
TypeScript
1
star
88

razonyang

1
star
89

hugo-mod-google-analytics

HTML
1
star
90

yii-translator-middleware

Yii Translator HTTP Middleware
PHP
1
star
91

hb-utterances

HB Utterances Module
1
star
92

hb-docs

The docs module for Hugo Bootstrap framework (HB)
HTML
1
star
93

hb-header

The universal header for Hugo Bootstrap framework (HB)
HTML
1
star
94

hugo-theme-bootstrap-site

HTML
1
star
95

hb-base

The base module for the Hugo Bootstrap framework.
SCSS
1
star
96

hb-giscus

TypeScript
1
star
97

php-router

A fast and high scalable HTTP router for PHP
PHP
1
star
98

hugo-mod-purgecss

Hugo PurgeCSS Module Cross Modules .
1
star
99

hb-pwa

The PWA Module for Hugo Bootstrap framework (HB)
HTML
1
star
100

hb-search

The search modal for Hugo Bootstrap framework
SCSS
1
star