fs.go
func NewPathSlashesStripper(slashesCount int) PathRewriteFunc {
	return func(ctx *RequestCtx) []byte {
		return stripLeadingSlashes(ctx.Path(), slashesCount)
	}
}
func NewPathSlashesStripper(slashesCount int) PathRewriteFunc {
	return func(ctx *RequestCtx) []byte {
		return stripLeadingSlashes(ctx.Path(), slashesCount)
	}
}
func NewPathSlashesStripper ( slashesCount int ) PathRewriteFunc { return func ( ctx * RequestCtx ) [ ] byte { return stripLeadingSlashes ( ctx . Path ( ) , slashesCount ) } }
// 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 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 .