Skip to content

Commit

Permalink
fix both have pointer and value receivers
Browse files Browse the repository at this point in the history
  • Loading branch information
blight19 committed Jan 10, 2024
1 parent 0747769 commit 98b076c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions client/selector.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ func newRandomSelector(servers map[string]string) Selector {
return &randomSelector{servers: ss}
}

func (s randomSelector) Select(ctx context.Context, servicePath, serviceMethod string, args interface{}) string {
func (s *randomSelector) Select(ctx context.Context, servicePath, serviceMethod string, args interface{}) string {
ss := s.servers
if len(ss) == 0 {
return ""
Expand Down Expand Up @@ -215,7 +215,7 @@ func newGeoSelector(servers map[string]string, latitude, longitude float64) Sele
return &geoSelector{servers: ss, Latitude: latitude, Longitude: longitude, r: r}
}

func (s geoSelector) Select(ctx context.Context, servicePath, serviceMethod string, args interface{}) string {
func (s *geoSelector) Select(ctx context.Context, servicePath, serviceMethod string, args interface{}) string {
if len(s.servers) == 0 {
return ""
}
Expand Down Expand Up @@ -291,7 +291,7 @@ func newConsistentHashSelector(servers map[string]string) Selector {
return &consistentHashSelector{servers: ss, h: h}
}

func (s consistentHashSelector) Select(ctx context.Context, servicePath, serviceMethod string, args interface{}) string {
func (s *consistentHashSelector) Select(ctx context.Context, servicePath, serviceMethod string, args interface{}) string {
ss := s.servers
if len(ss) == 0 {
return ""
Expand Down

0 comments on commit 98b076c

Please sign in to comment.