remove useless code

This commit is contained in:
ziv 2022-08-01 17:43:59 +08:00
parent 136055723f
commit 522b884697
1 changed files with 3 additions and 2 deletions

View File

@ -15,8 +15,6 @@ import (
"flashcat.cloud/categraf/writer"
)
const agentHostnameLabelKey = "agent_hostname"
var metricReplacer = strings.NewReplacer("-", "_", ".", "_", " ", "_", "'", "_", "\"", "_")
type InputReader struct {
@ -117,6 +115,9 @@ func (r *InputReader) gatherOnce() {
}
func (r *InputReader) forward(slist *types.SampleList) {
if slist == nil {
return
}
arr := slist.PopBackAll()
for i := 0; i < len(arr); i++ {
writer.PushQueue(arr[i])