コード例 #1
0
ファイル: protolion.go プロジェクト: ModelRocket/openstorage
func init() {
	if err := lion.RegisterEncoderDecoder(Encoding, newEncoderDecoder()); err != nil {
		panic(err.Error())
	}
	lion.SetJSONMarshalFunc(DefaultJSONMarshalFunc)
	lion.AddGlobalHook(setGlobalLogger)
}
コード例 #2
0
ファイル: thriftlion.go プロジェクト: peter-edge/lion-go
func init() {
	if err := lion.RegisterEncoderDecoder(
		Encoding,
		newEncoderDecoder(
			Encoding,
			thrift.NewTBinaryProtocolFactory(
				true,
				true,
			),
		),
	); err != nil {
		panic(err.Error())
	}
	lion.AddGlobalHook(setGlobalLogger)
}