mirror of
https://github.com/linka-cloud/grpc.git
synced 2024-11-21 18:36:25 +00:00
codec: register on init
Signed-off-by: Adphi <philippe.adrien.nousse@gmail.com>
This commit is contained in:
parent
e295da1988
commit
3af87d65d6
@ -3,6 +3,8 @@ package codec
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"google.golang.org/grpc/encoding"
|
||||
_ "google.golang.org/grpc/encoding/proto"
|
||||
"google.golang.org/protobuf/proto"
|
||||
)
|
||||
|
||||
@ -50,3 +52,7 @@ func (Codec) Unmarshal(data []byte, v interface{}) error {
|
||||
func (Codec) Name() string {
|
||||
return Name
|
||||
}
|
||||
|
||||
func init() {
|
||||
encoding.RegisterCodec(Codec{})
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user