blob: 1226fc97a99610eb95b81db01fc9c20ad5effcb5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
|
//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
}
|