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
a2dfa31334
commit
de8a8afa22
1 changed files with 3 additions and 4 deletions
|
|
@ -1,7 +1,6 @@
|
|||
package influxdb
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
uurl "net/url"
|
||||
"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 {
|
||||
u, err := uurl.Parse(url)
|
||||
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{
|
||||
|
|
@ -77,11 +76,11 @@ func InfluxDBWithTagsOnce(r metrics.Registry, url, database, username, password,
|
|||
cache: make(map[string]int64),
|
||||
}
|
||||
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 {
|
||||
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
|
||||
|
|
|
|||
Loading…
Reference in a new issue