View definition

func NewPathSlashesStripper

Defined in github.com/valyala/fasthttp/fs.go

Description

NewPathSlashesStripper returns path rewriter, which strips slashesCount leading slashes from the path.

Examples:

* slashesCount = 0, original path: "/foo/bar", result: "/foo/bar"
* slashesCount = 1, original path: "/foo/bar", result: "/bar"
* slashesCount = 2, original path: "/foo/bar", result: ""

The returned path rewriter may be used as FS.PathRewrite .

NewPathSlashesStripper is referenced in 3 repositories

github.com/valyala/fasthttp github.com/go-gas/gas github.com/kataras/iris