mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2024-11-21 14:44:00 +00:00
lib/promscrape: use strconv.Atoi instead of strconv.ParseInt for parsing -promscrape.cluster.memberNum
In this case there is no need in converting int64 to int
This commit is contained in:
parent
f5ef3806c9
commit
d2567ccdd6
1 changed files with 2 additions and 2 deletions
|
@ -68,11 +68,11 @@ func mustInitClusterMemberID() {
|
|||
if idx := strings.LastIndexByte(s, '-'); idx >= 0 {
|
||||
s = s[idx+1:]
|
||||
}
|
||||
n, err := strconv.ParseInt(s, 10, 64)
|
||||
n, err := strconv.Atoi(s)
|
||||
if err != nil {
|
||||
logger.Fatalf("cannot parse -promscrape.cluster.memberNum=%q: %s", *clusterMemberNum, err)
|
||||
}
|
||||
clusterMemberID = int(n)
|
||||
clusterMemberID = n
|
||||
}
|
||||
|
||||
// Config represents essential parts from Prometheus config defined at https://prometheus.io/docs/prometheus/latest/configuration/configuration/
|
||||
|
|
Loading…
Reference in a new issue