hanayo/vendor/github.com/valyala/fasthttp/uri_unix.go

13 lines
202 B
Go
Raw Permalink Normal View History

2019-02-23 13:29:15 +00:00
// +build !windows
package fasthttp
func addLeadingSlash(dst, src []byte) []byte {
// add leading slash for unix paths
if len(src) == 0 || src[0] != '/' {
dst = append(dst, '/')
}
return dst
}