Merge pull request #5811 from davygeek/golintnotice

client: follow golint notice change errors.New to fmt.Errorf
This commit is contained in:
Gyu-Ho Lee 2016-06-29 09:12:49 -07:00 committed by GitHub
commit 7f3b2e23a4

View File

@ -301,7 +301,7 @@ func (c *httpClusterClient) SetEndpoints(eps []string) error {
// If endpoints doesn't have the lu, just keep c.pinned = 0.
// Forwarding between follower and leader would be required but it works.
default:
return errors.New(fmt.Sprintf("invalid endpoint selection mode: %d", c.selectionMode))
return fmt.Errorf("invalid endpoint selection mode: %d", c.selectionMode)
}
return nil
@ -393,7 +393,7 @@ func (c *httpClusterClient) Sync(ctx context.Context) error {
c.Lock()
defer c.Unlock()
eps := make([]string, 0)
var eps []string
for _, m := range ms {
eps = append(eps, m.ClientURLs...)
}