Skip to content

Commit

Permalink
Do not use strings.Builder as it's not supported by this branchs Go v…
Browse files Browse the repository at this point in the history
…ersion
  • Loading branch information
Carlos Pérez-Aradros Herce committed Jun 13, 2018
1 parent 1ca5318 commit 1e600f3
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions filebeat/input/file/state.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package file
import (
"os"
"strconv"
"strings"
"time"

"github.com/mitchellh/hashstructure"
Expand Down Expand Up @@ -51,14 +50,7 @@ func (s *State) ID() string {
hash := strconv.AppendUint(hashBuf[:0], hashValue, 16)
hash = append(hash, '-')

fileID := s.FileStateOS.String()

var b strings.Builder
b.Grow(len(hash) + len(fileID))
b.Write(hash)
b.WriteString(fileID)

s.Id = b.String()
s.Id = string(hash) + s.FileStateOS.String()
}
}

Expand Down

0 comments on commit 1e600f3

Please sign in to comment.