mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2025-01-04 13:52:05 +01:00
ffebc20f6d
The v1.2.0 adds HostClient.DoCtx() function, which is needed by https://github.com/VictoriaMetrics/VictoriaMetrics/issues/3747 for implementing fast canceling of pending requests to scrape targets on config update
14 lines
222 B
Go
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
|
|
}
|