Commit c94b38cb authored by Kamil Kisiel's avatar Kamil Kisiel

Fixed documentation typo

parent 8cf6ad33
...@@ -10,7 +10,7 @@ import ( ...@@ -10,7 +10,7 @@ import (
const DefaultConsoleAddr = ":8126" const DefaultConsoleAddr = ":8126"
// ConsoleServer is an object that listens for telnet connection on a TCP address Addr // ConsoleServer is an object that listens for telnet connection on a TCP address Addr
// and provides a console interface to a manage a MetricsAggregator // and provides a console interface to a manage a MetricAggregator
type ConsoleServer struct { type ConsoleServer struct {
Addr string Addr string
Aggregator *MetricAggregator Aggregator *MetricAggregator
......
...@@ -4,9 +4,17 @@ import ( ...@@ -4,9 +4,17 @@ import (
"bytes" "bytes"
"fmt" "fmt"
"net" "net"
"regexp"
"time" "time"
) )
// Regular expressions used for bucket name normalization
var (
regSpaces = regexp.MustCompile("\\s+")
regSlashes = regexp.MustCompile("\\/")
regInvalid = regexp.MustCompile("[^a-zA-Z_\\-0-9\\.]")
)
// normalizeBucketName cleans up a bucket name by replacing or translating invalid characters // normalizeBucketName cleans up a bucket name by replacing or translating invalid characters
func normalizeBucketName(name string) string { func normalizeBucketName(name string) string {
nospaces := regSpaces.ReplaceAllString(name, "_") nospaces := regSpaces.ReplaceAllString(name, "_")
......
...@@ -3,14 +3,6 @@ package statsd ...@@ -3,14 +3,6 @@ package statsd
import ( import (
"bytes" "bytes"
"fmt" "fmt"
"regexp"
)
// Regular expressions used for bucket name normalization
var (
regSpaces = regexp.MustCompile("\\s+")
regSlashes = regexp.MustCompile("\\/")
regInvalid = regexp.MustCompile("[^a-zA-Z_\\-0-9\\.]")
) )
type MetricType float64 type MetricType float64
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment