Skip to content

Commit

Permalink
fmt (#35)
Browse files Browse the repository at this point in the history
  • Loading branch information
tianxiaoliang authored Jan 18, 2019
1 parent b972510 commit f54bd13
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ This client implements all the [api's](https://rawcdn.githack.com/go-chassis/ser



**NOTICE**: this client is migrate to github.com/go-chassis/go-chassis/pkg/scclient
8 changes: 5 additions & 3 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,15 @@ module github.com/go-chassis/go-sc-client

require (
github.com/cenkalti/backoff v2.0.0+incompatible
github.com/go-chassis/go-chassis v1.2.0
github.com/go-chassis/go-chassis v1.1.3
github.com/go-chassis/paas-lager v0.0.0-20181123014243-005283cca84c
github.com/go-logfmt/logfmt v0.4.0 // indirect
github.com/go-mesh/openlogging v0.0.0-20181122085847-3daf3ad8ed35
github.com/gogo/protobuf v1.2.0 // indirect
github.com/golang/protobuf v1.2.0
github.com/gorilla/websocket v1.4.0
github.com/stretchr/testify v1.2.2
golang.org/x/net v0.0.0-20180824152047-4bcd98cce591
google.golang.org/grpc v1.14.0
golang.org/x/net v0.0.0-20181114220301-adae6a3d119a
google.golang.org/grpc v1.16.0

)
5 changes: 3 additions & 2 deletions util.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ package client

import (
"github.com/cenkalti/backoff"
"github.com/go-chassis/go-sc-client/proto"
"log"
"net/url"
"time"
"github.com/go-chassis/go-sc-client/proto"
)

func getBackOff(backoffType string) backoff.BackOff {
Expand Down Expand Up @@ -41,7 +41,8 @@ func getProtocolMap(eps []string) map[string]string {
return m
}

func RegroupInstances(keys []*proto.FindService,response proto.BatchFindInstancesResponse) map[string][]*proto.MicroServiceInstance{
//RegroupInstances organize raw data to better format
func RegroupInstances(keys []*proto.FindService, response proto.BatchFindInstancesResponse) map[string][]*proto.MicroServiceInstance {
instanceMap := make(map[string][]*proto.MicroServiceInstance, 0)
if response.Services != nil {
for _, result := range response.Services.Updated {
Expand Down

0 comments on commit f54bd13

Please sign in to comment.