Shorten name of static-lifetime string var.

pull/7350/head
rw 2016-09-26 11:26:24 -07:00
parent 02c86ea9db
commit 68c2212aac
1 changed files with 3 additions and 3 deletions

View File

@ -60,7 +60,7 @@ var (
var (
// Static objects to prevent small allocs.
staticTimeByteSlice = []byte("time")
timeTag = []byte("time")
)
// A ShardError implements the error interface, and contains extra
@ -470,9 +470,9 @@ func (s *Shard) validateSeriesAndFields(points []models.Point) ([]*FieldCreate,
for _, p := range points {
// verify the tags and fields
tags := p.Tags()
if v := tags.Get(staticTimeByteSlice); v != nil {
if v := tags.Get(timeTag); v != nil {
s.logger.Printf("dropping tag 'time' from '%s'\n", p.PrecisionString(""))
tags.Delete(staticTimeByteSlice)
tags.Delete(timeTag)
p.SetTags(tags)
}