mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-19 18:32:23 +00:00
fix linter errors
This commit is contained in:
parent
1569d4f55f
commit
0edb2bbfe1
1 changed files with 3 additions and 4 deletions
|
|
@ -1,7 +1,6 @@
|
||||||
package influxdb
|
package influxdb
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"errors"
|
|
||||||
"fmt"
|
"fmt"
|
||||||
uurl "net/url"
|
uurl "net/url"
|
||||||
"time"
|
"time"
|
||||||
|
|
@ -63,7 +62,7 @@ func InfluxDBWithTags(r metrics.Registry, d time.Duration, url, database, userna
|
||||||
func InfluxDBWithTagsOnce(r metrics.Registry, url, database, username, password, namespace string, tags map[string]string) error {
|
func InfluxDBWithTagsOnce(r metrics.Registry, url, database, username, password, namespace string, tags map[string]string) error {
|
||||||
u, err := uurl.Parse(url)
|
u, err := uurl.Parse(url)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return errors.New(fmt.Sprintf("Unable to parse InfluxDB. url: %s, err: %v", url, err))
|
return fmt.Errorf("Unable to parse InfluxDB. url: %s, err: %v", url, err)
|
||||||
}
|
}
|
||||||
|
|
||||||
rep := &reporter{
|
rep := &reporter{
|
||||||
|
|
@ -77,11 +76,11 @@ func InfluxDBWithTagsOnce(r metrics.Registry, url, database, username, password,
|
||||||
cache: make(map[string]int64),
|
cache: make(map[string]int64),
|
||||||
}
|
}
|
||||||
if err := rep.makeClient(); err != nil {
|
if err := rep.makeClient(); err != nil {
|
||||||
return errors.New(fmt.Sprintf("Unable to make InfluxDB client. err: %v", err))
|
return fmt.Errorf("Unable to make InfluxDB client. err: %v", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
if err := rep.send(); err != nil {
|
if err := rep.send(); err != nil {
|
||||||
return errors.New(fmt.Sprintf("Unable to send to InfluxDB. err: %v", err))
|
return fmt.Errorf("Unable to send to InfluxDB. err: %v", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue