set grpc by default (#1070)

This commit is contained in:
Asim Aslam 2019-12-30 18:33:21 +00:00 committed by GitHub
parent 04dfe4e867
commit b6915f0898
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

17
defaults.go Normal file
View File

@ -0,0 +1,17 @@
package micro
import (
"github.com/micro/go-micro/client"
"github.com/micro/go-micro/server"
// set defaults
gcli "github.com/micro/go-micro/client/grpc"
gsrv "github.com/micro/go-micro/server/grpc"
)
func init() {
// default client
client.DefaultClient = gcli.NewClient()
// default server
server.DefaultServer = gsrv.NewServer()
}