yanic/database/graphite/utils.go

12 lines
201 B
Go
Raw Permalink Normal View History

package graphite
import (
"regexp"
)
var reInvalidChars = regexp.MustCompile("(?i)[^a-z0-9\\-]")
func replaceInvalidChars(name string) string {
return reInvalidChars.ReplaceAllString(name, "_")
}