Fix assorted spelling mistakes (#7507)

This commit is contained in:
Josh Soref
2020-05-15 18:43:32 -04:00
committed by GitHub
parent f74824eecb
commit bf1eb291f2
41 changed files with 79 additions and 79 deletions

View File

@@ -16,14 +16,14 @@ import (
var (
allowedChars = regexp.MustCompile(`[^a-zA-Z0-9-_./\p{L}]`)
hypenChars = strings.NewReplacer(
hyphenChars = strings.NewReplacer(
"@", "-",
"*", "-",
`%`, "-",
"#", "-",
"$", "-")
defaultHttpPath = "/api/put"
defaultSeperator = "_"
defaultSeparator = "_"
)
type OpenTSDB struct {
@@ -261,8 +261,8 @@ func (o *OpenTSDB) Close() error {
}
func sanitize(value string) string {
// Apply special hypenation rules to preserve backwards compatibility
value = hypenChars.Replace(value)
// Apply special hyphenation rules to preserve backwards compatibility
value = hyphenChars.Replace(value)
// Replace any remaining illegal chars
return allowedChars.ReplaceAllLiteralString(value, "_")
}
@@ -271,7 +271,7 @@ func init() {
outputs.Add("opentsdb", func() telegraf.Output {
return &OpenTSDB{
HttpPath: defaultHttpPath,
Separator: defaultSeperator,
Separator: defaultSeparator,
}
})
}