mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2024-12-21 16:06:31 +01:00
14 lines
232 B
Go
14 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
|
|
}
|