b5a694a7a4
* Bugfix: Graphite compatibility with meshviewer * Bugfix: Bad message: Router type not sanitized * Refactoring: Implemented replaceInvalidChars function for Graphite
12 lines
201 B
Go
12 lines
201 B
Go
package graphite
|
|
|
|
import (
|
|
"regexp"
|
|
)
|
|
|
|
var reInvalidChars = regexp.MustCompile("(?i)[^a-z0-9\\-]")
|
|
|
|
func replaceInvalidChars(name string) string {
|
|
return reInvalidChars.ReplaceAllString(name, "_")
|
|
}
|