Skip to content

Commit

Permalink
Deps/update kratos (#77)
Browse files Browse the repository at this point in the history
* update kratos to v0.6.0
  • Loading branch information
tonybase authored Dec 4, 2020
1 parent 5a80d90 commit 1e12d5c
Show file tree
Hide file tree
Showing 20 changed files with 126 additions and 69 deletions.
2 changes: 1 addition & 1 deletion cmd/discovery/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"github.com/bilibili/discovery/conf"
"github.com/bilibili/discovery/discovery"
"github.com/bilibili/discovery/http"
log "github.com/bilibili/kratos/pkg/log"
log "github.com/go-kratos/kratos/pkg/log"
)

func main() {
Expand Down
8 changes: 4 additions & 4 deletions conf/conf.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ package conf

import (
"github.com/BurntSushi/toml"
"github.com/bilibili/kratos/pkg/conf/env"
"github.com/bilibili/kratos/pkg/conf/paladin"
log "github.com/bilibili/kratos/pkg/log"
http "github.com/bilibili/kratos/pkg/net/http/blademaster"
"github.com/go-kratos/kratos/pkg/conf/env"
"github.com/go-kratos/kratos/pkg/conf/paladin"
log "github.com/go-kratos/kratos/pkg/log"
http "github.com/go-kratos/kratos/pkg/net/http/blademaster"
)

var (
Expand Down
2 changes: 1 addition & 1 deletion discovery/discovery.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (

"github.com/bilibili/discovery/conf"
"github.com/bilibili/discovery/registry"
http "github.com/bilibili/kratos/pkg/net/http/blademaster"
http "github.com/go-kratos/kratos/pkg/net/http/blademaster"
)

// Discovery discovery.
Expand Down
5 changes: 2 additions & 3 deletions discovery/register.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,8 @@ import (

"github.com/bilibili/discovery/model"
"github.com/bilibili/discovery/registry"
"github.com/bilibili/kratos/pkg/ecode"

log "github.com/bilibili/kratos/pkg/log"
"github.com/go-kratos/kratos/pkg/ecode"
log "github.com/go-kratos/kratos/pkg/log"
)

// Register a new instance.
Expand Down
8 changes: 4 additions & 4 deletions discovery/register_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ import (
dc "github.com/bilibili/discovery/conf"
"github.com/bilibili/discovery/model"

"github.com/bilibili/kratos/pkg/conf/paladin"
"github.com/bilibili/kratos/pkg/ecode"
http "github.com/bilibili/kratos/pkg/net/http/blademaster"
xtime "github.com/bilibili/kratos/pkg/time"
"github.com/go-kratos/kratos/pkg/conf/paladin"
"github.com/go-kratos/kratos/pkg/ecode"
http "github.com/go-kratos/kratos/pkg/net/http/blademaster"
xtime "github.com/go-kratos/kratos/pkg/time"
. "github.com/smartystreets/goconvey/convey"
gock "gopkg.in/h2non/gock.v1"
)
Expand Down
5 changes: 2 additions & 3 deletions discovery/syncup.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,8 @@ import (
"github.com/bilibili/discovery/conf"
"github.com/bilibili/discovery/model"
"github.com/bilibili/discovery/registry"
"github.com/bilibili/kratos/pkg/ecode"

log "github.com/bilibili/kratos/pkg/log"
"github.com/go-kratos/kratos/pkg/ecode"
log "github.com/go-kratos/kratos/pkg/log"
)

var (
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ go 1.12

require (
github.com/BurntSushi/toml v0.3.1
github.com/bilibili/kratos v0.3.3
github.com/go-kratos/kratos v0.6.0
github.com/gopherjs/gopherjs v0.0.0-20190430165422-3e4dfb77656c // indirect
github.com/jtolds/gls v4.20.0+incompatible // indirect
github.com/nbio/st v0.0.0-20140626010706-e9e8d9816f32 // indirect
Expand Down
107 changes: 83 additions & 24 deletions go.sum

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions http/discovery.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ import (

"github.com/bilibili/discovery/model"

"github.com/bilibili/kratos/pkg/ecode"
log "github.com/bilibili/kratos/pkg/log"
bm "github.com/bilibili/kratos/pkg/net/http/blademaster"
"github.com/go-kratos/kratos/pkg/ecode"
log "github.com/go-kratos/kratos/pkg/log"
bm "github.com/go-kratos/kratos/pkg/net/http/blademaster"
)

const (
Expand Down
4 changes: 2 additions & 2 deletions http/http.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import (
"github.com/bilibili/discovery/conf"
"github.com/bilibili/discovery/discovery"

log "github.com/bilibili/kratos/pkg/log"
bm "github.com/bilibili/kratos/pkg/net/http/blademaster"
log "github.com/go-kratos/kratos/pkg/log"
bm "github.com/go-kratos/kratos/pkg/net/http/blademaster"
)

var (
Expand Down
4 changes: 2 additions & 2 deletions model/instance.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import (
"sync"
"time"

"github.com/bilibili/kratos/pkg/ecode"
log "github.com/bilibili/kratos/pkg/log"
"github.com/go-kratos/kratos/pkg/ecode"
log "github.com/go-kratos/kratos/pkg/log"
)

// InstanceStatus Status of instance
Expand Down
8 changes: 4 additions & 4 deletions naming/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ import (
"sync/atomic"
"time"

ecode "github.com/bilibili/kratos/pkg/ecode"
log "github.com/bilibili/kratos/pkg/log"
http "github.com/bilibili/kratos/pkg/net/http/blademaster"
xtime "github.com/bilibili/kratos/pkg/time"
ecode "github.com/go-kratos/kratos/pkg/ecode"
log "github.com/go-kratos/kratos/pkg/log"
http "github.com/go-kratos/kratos/pkg/net/http/blademaster"
xtime "github.com/go-kratos/kratos/pkg/time"
)

const (
Expand Down
6 changes: 3 additions & 3 deletions naming/client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ import (
"github.com/bilibili/discovery/discovery"
"github.com/bilibili/discovery/http"

"github.com/bilibili/kratos/pkg/conf/paladin"
xhttp "github.com/bilibili/kratos/pkg/net/http/blademaster"
xtime "github.com/bilibili/kratos/pkg/time"
"github.com/go-kratos/kratos/pkg/conf/paladin"
xhttp "github.com/go-kratos/kratos/pkg/net/http/blademaster"
xtime "github.com/go-kratos/kratos/pkg/time"
. "github.com/smartystreets/goconvey/convey"
)

Expand Down
2 changes: 1 addition & 1 deletion naming/grpc/resolver.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (

"github.com/bilibili/discovery/naming"

log "github.com/bilibili/kratos/pkg/log"
log "github.com/go-kratos/kratos/pkg/log"
"google.golang.org/grpc/resolver"
)

Expand Down
2 changes: 1 addition & 1 deletion registry/guard.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"sync"
"sync/atomic"

log "github.com/bilibili/kratos/pkg/log"
log "github.com/go-kratos/kratos/pkg/log"
)

const (
Expand Down
6 changes: 3 additions & 3 deletions registry/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ import (

"github.com/bilibili/discovery/conf"
"github.com/bilibili/discovery/model"
"github.com/bilibili/kratos/pkg/ecode"
log "github.com/bilibili/kratos/pkg/log"
http "github.com/bilibili/kratos/pkg/net/http/blademaster"
"github.com/go-kratos/kratos/pkg/ecode"
log "github.com/go-kratos/kratos/pkg/log"
http "github.com/go-kratos/kratos/pkg/net/http/blademaster"
)

const (
Expand Down
8 changes: 4 additions & 4 deletions registry/node_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ import (

dc "github.com/bilibili/discovery/conf"
"github.com/bilibili/discovery/model"
"github.com/bilibili/kratos/pkg/ecode"
bm "github.com/bilibili/kratos/pkg/net/http/blademaster"
"github.com/bilibili/kratos/pkg/net/http/blademaster/binding"
xtime "github.com/bilibili/kratos/pkg/time"
"github.com/go-kratos/kratos/pkg/ecode"
bm "github.com/go-kratos/kratos/pkg/net/http/blademaster"
"github.com/go-kratos/kratos/pkg/net/http/blademaster/binding"
xtime "github.com/go-kratos/kratos/pkg/time"

. "github.com/smartystreets/goconvey/convey"
gock "gopkg.in/h2non/gock.v1"
Expand Down
4 changes: 2 additions & 2 deletions registry/registry.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import (
"github.com/bilibili/discovery/conf"
"github.com/bilibili/discovery/model"

"github.com/bilibili/kratos/pkg/ecode"
log "github.com/bilibili/kratos/pkg/log"
"github.com/go-kratos/kratos/pkg/ecode"
log "github.com/go-kratos/kratos/pkg/log"
)

const (
Expand Down
4 changes: 2 additions & 2 deletions registry/registry_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import (

"github.com/bilibili/discovery/conf"
"github.com/bilibili/discovery/model"
"github.com/bilibili/kratos/pkg/conf/paladin"
"github.com/bilibili/kratos/pkg/ecode"
"github.com/go-kratos/kratos/pkg/conf/paladin"
"github.com/go-kratos/kratos/pkg/ecode"

. "github.com/smartystreets/goconvey/convey"
)
Expand Down
2 changes: 1 addition & 1 deletion registry/scheduler.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"sync"

"github.com/bilibili/discovery/model"
"github.com/bilibili/kratos/pkg/conf/paladin"
"github.com/go-kratos/kratos/pkg/conf/paladin"
)

// Scheduler info.
Expand Down

0 comments on commit 1e12d5c

Please sign in to comment.