fix golint issues in core/discov (#479)

This commit is contained in:
Kevin Wan
2021-02-18 22:56:35 +08:00
committed by GitHub
parent f6894448bd
commit 2446d8a668
4 changed files with 23 additions and 1 deletions

View File

@@ -2,11 +2,13 @@ package discov
import "errors"
// EtcdConf is the config item with the given key on etcd.
type EtcdConf struct {
Hosts []string
Key string
}
// Validate validates c.
func (c EtcdConf) Validate() error {
if len(c.Hosts) == 0 {
return errors.New("empty etcd hosts")