lib/bytesutil: move InternString() from lib/promscrape/discoverytutils to lib/bytesutil

lib/bytesutil is more appropriate place for InternString() function
This commit is contained in:
Aliaksandr Valialkin 2022-09-30 07:34:14 +03:00
parent f61b8cec69
commit 593da3603e
No known key found for this signature in database
GPG key ID: A72BEC6CD3D0DED1
4 changed files with 5 additions and 6 deletions

View file

@ -1,4 +1,4 @@
package discoveryutils
package bytesutil
import (
"sync"

View file

@ -1,4 +1,4 @@
package discoveryutils
package bytesutil
import (
"fmt"

View file

@ -1,4 +1,4 @@
package discoveryutils
package bytesutil
import (
"fmt"

View file

@ -34,7 +34,6 @@ import (
"github.com/VictoriaMetrics/VictoriaMetrics/lib/promscrape/discovery/kubernetes"
"github.com/VictoriaMetrics/VictoriaMetrics/lib/promscrape/discovery/openstack"
"github.com/VictoriaMetrics/VictoriaMetrics/lib/promscrape/discovery/yandexcloud"
"github.com/VictoriaMetrics/VictoriaMetrics/lib/promscrape/discoveryutils"
"github.com/VictoriaMetrics/VictoriaMetrics/lib/promutils"
"github.com/VictoriaMetrics/VictoriaMetrics/lib/proxy"
"github.com/VictoriaMetrics/metrics"
@ -1330,8 +1329,8 @@ func (swc *scrapeWorkConfig) getScrapeWork(target string, extraLabels, metaLabel
func internLabelStrings(labels []prompbmarshal.Label) {
for i := range labels {
label := &labels[i]
label.Name = discoveryutils.InternString(label.Name)
label.Value = discoveryutils.InternString(label.Value)
label.Name = bytesutil.InternString(label.Name)
label.Value = bytesutil.InternString(label.Value)
}
}