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

13 lines
203 B
Go
Raw Normal View History

2024-07-02 16:36:04 +02:00
//go: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
}