mirror of
https://github.com/protocolbuffers/protobuf-go.git
synced 2025-01-17 01:12:51 +00:00
internal/impl: rename encode->codec in various places
The code organization is simpler if we keep the functions encoding and decoding a particular type (e.g., maps) together rather than split across files. Rename various "encode" files to "codec" in preparation for adding fast-path decoding. Change-Id: If1e271da99d31533ffefc19b1fc847936fa9484a Reviewed-on: https://go-review.googlesource.com/c/protobuf/+/185241 Reviewed-by: Joe Tsai <thebrokentoaster@gmail.com>
This commit is contained in:
parent
8b0b71e9b6
commit
edf7bdda31
@ -8,11 +8,11 @@ import (
|
||||
"text/template"
|
||||
)
|
||||
|
||||
func generateImplEncode() string {
|
||||
return mustExecute(implEncodeTemplate, ProtoKinds)
|
||||
func generateImplCodec() string {
|
||||
return mustExecute(implCodecTemplate, ProtoKinds)
|
||||
}
|
||||
|
||||
var implEncodeTemplate = template.Must(template.New("").Parse(`
|
||||
var implCodecTemplate = template.Must(template.New("").Parse(`
|
||||
{{- /*
|
||||
IsZero is an expression testing if 'v' is the zero value.
|
||||
*/ -}}
|
||||
|
@ -38,7 +38,7 @@ func main() {
|
||||
|
||||
chdirRoot()
|
||||
writeSource("internal/filedesc/desc_list_gen.go", generateDescListTypes())
|
||||
writeSource("internal/impl/encode_gen.go", generateImplEncode())
|
||||
writeSource("internal/impl/codec_gen.go", generateImplCodec())
|
||||
writeSource("proto/decode_gen.go", generateProtoDecode())
|
||||
writeSource("proto/encode_gen.go", generateProtoEncode())
|
||||
writeSource("proto/size_gen.go", generateProtoSize())
|
||||
|
Loading…
Reference in New Issue
Block a user