mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2024-12-01 14:47:38 +00:00
13 lines
232 B
Go
13 lines
232 B
Go
package utils
|
|
|
|
import "strings"
|
|
|
|
const prefix = "/vmalert/"
|
|
|
|
// Prefix returns "/vmalert/" prefix if it is missing in the path.
|
|
func Prefix(path string) string {
|
|
if strings.HasPrefix(path, prefix) {
|
|
return ""
|
|
}
|
|
return prefix
|
|
}
|