mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2025-01-07 08:32:18 +01:00
b6d88bac04
The upstream fasthttp may contain issues like 996610f021
,
plus a code that isn't used by VictoriaMetrics. So let's use a private copy under our control instead.
13 lines
202 B
Go
13 lines
202 B
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
|
|
}
|