Files
fasthttp/uri_unix.go
T
2021-09-02 00:18:53 +02:00

14 lines
222 B
Go

//go:build !windows
// +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
}