Skip to content

Commit

Permalink
grpclb: minor fixes on comments and tests (grpc#2122)
Browse files Browse the repository at this point in the history
* modify noimport.go panic message
* package level comments
* remove useless error check at grpclb_test.go:343
  • Loading branch information
menghanl authored Jun 5, 2018
1 parent c1a21e2 commit 629f6bc
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
6 changes: 5 additions & 1 deletion balancer/grpclb/grpclb.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,11 @@
*
*/

package grpclb // import "google.golang.org/grpc/balancer/grpclb"
// Package grpclb defines a grpclb balancer.
//
// To install grpclb balancer, import this package as:
// import _ "google.golang.org/grpc/balancer/grpclb"
package grpclb

import (
"strconv"
Expand Down
4 changes: 0 additions & 4 deletions balancer/grpclb/grpclb_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -340,10 +340,6 @@ func newLoadBalancer(numberOfBackends int) (tss *testServers, cleanup func(), er
sn: lbServerName,
}
lb = grpc.NewServer(grpc.Creds(lbCreds))
if err != nil {
err = fmt.Errorf("Failed to generate the port number %v", err)
return
}
ls = newRemoteBalancer(nil)
lbspb.RegisterLoadBalancerServer(lb, ls)
go func() {
Expand Down
2 changes: 1 addition & 1 deletion grpclb/noimport.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,5 @@
package grpclb

func init() {
panic("don't import me")
panic("Don't import this package. For grpclb, see package google.golang.org/grpc/balancer/grpclb")
}

0 comments on commit 629f6bc

Please sign in to comment.