diff --git a/app.go b/app.go index 8049085f5..fe060f383 100644 --- a/app.go +++ b/app.go @@ -49,11 +49,6 @@ func New(opts ...Option) *App { // Run executes all OnStart hooks registered with the application's Lifecycle. func (a *App) Run() error { - a.log.Infow( - "service_id", a.opts.id, - "service_name", a.opts.name, - "service_version", a.opts.version, - ) instance, err := a.buildInstance() if err != nil { return err diff --git a/examples/metadata/client/main.go b/examples/metadata/client/main.go index f91d811e6..2499c432d 100644 --- a/examples/metadata/client/main.go +++ b/examples/metadata/client/main.go @@ -30,8 +30,12 @@ func callHTTP() { panic(err) } client := helloworld.NewGreeterHTTPClient(conn) - md := metadata.New(map[string][]string{"kratos-extra": {"2233"}}) - reply, err := client.SayHello(context.Background(), &helloworld.HelloRequest{Name: "kratos"}, http.Metadata(md)) + md := metadata.Metadata{"kratos-extra": "2233"} + reply, err := client.SayHello(context.Background(), + &helloworld.HelloRequest{Name: "kratos"}, + // call options + http.Metadata(md), + ) if err != nil { log.Fatal(err) } diff --git a/examples/ws/main.go b/examples/ws/main.go index e48da16bf..92a08bf22 100644 --- a/examples/ws/main.go +++ b/examples/ws/main.go @@ -5,7 +5,7 @@ import ( "github.com/go-kratos/kratos/examples/ws/handler" "github.com/go-kratos/kratos/v2" - transhttp "github.com/go-kratos/kratos/v2/transport/http" + "github.com/go-kratos/kratos/v2/transport/http" "github.com/gorilla/mux" ) @@ -13,7 +13,7 @@ func main() { router := mux.NewRouter() router.HandleFunc("/ws", handler.WsHandler) - httpSrv := transhttp.NewServer(transhttp.Address(":8080")) + httpSrv := http.NewServer(http.Address(":8080")) httpSrv.HandlePrefix("/", router) app := kratos.New(