Skip to content

Commit

Permalink
Use "copy()" instead of loop (#222)
Browse files Browse the repository at this point in the history
  • Loading branch information
martin-helmich authored Nov 20, 2021
1 parent 35a0157 commit 0eeba93
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -367,9 +367,7 @@ func processSource(nsCfg config.NamespaceConfig, t tail.Follower, parser parser.
relabelLabelOffset := len(staticLabelValues)
labelValues := make([]string, totalLabelCount)

for i := range staticLabelValues {
labelValues[i] = staticLabelValues[i]
}
copy(labelValues, staticLabelValues)

for line := range t.Lines() {
if nsCfg.PrintLog {
Expand Down

0 comments on commit 0eeba93

Please sign in to comment.