cmd/protoc-gen-gogoctrd: turn off GoString generation
Signed-off-by: Stephen J Day <stephen.day@docker.com>
This commit is contained in:
parent
a891727e69
commit
a3120172b0
8 changed files with 172 additions and 806 deletions
|
@ -20,9 +20,6 @@ import _ "github.com/gogo/protobuf/gogoproto"
|
|||
import containerd_v1_types "github.com/docker/containerd/api/types/state"
|
||||
|
||||
import strings "strings"
|
||||
import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto"
|
||||
import sort "sort"
|
||||
import strconv "strconv"
|
||||
import reflect "reflect"
|
||||
|
||||
import io "io"
|
||||
|
@ -51,44 +48,6 @@ func (*Container) Descriptor() ([]byte, []int) { return fileDescriptorContainer,
|
|||
func init() {
|
||||
proto.RegisterType((*Container)(nil), "containerd.v1.types.Container")
|
||||
}
|
||||
func (this *Container) GoString() string {
|
||||
if this == nil {
|
||||
return "nil"
|
||||
}
|
||||
s := make([]string, 0, 7)
|
||||
s = append(s, "&container.Container{")
|
||||
s = append(s, "ID: "+fmt.Sprintf("%#v", this.ID)+",\n")
|
||||
s = append(s, "Bundle: "+fmt.Sprintf("%#v", this.Bundle)+",\n")
|
||||
s = append(s, "State: "+fmt.Sprintf("%#v", this.State)+",\n")
|
||||
s = append(s, "}")
|
||||
return strings.Join(s, "")
|
||||
}
|
||||
func valueToGoStringContainer(v interface{}, typ string) string {
|
||||
rv := reflect.ValueOf(v)
|
||||
if rv.IsNil() {
|
||||
return "nil"
|
||||
}
|
||||
pv := reflect.Indirect(rv).Interface()
|
||||
return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv)
|
||||
}
|
||||
func extensionToGoStringContainer(m github_com_gogo_protobuf_proto.Message) string {
|
||||
e := github_com_gogo_protobuf_proto.GetUnsafeExtensionsMap(m)
|
||||
if e == nil {
|
||||
return "nil"
|
||||
}
|
||||
s := "proto.NewUnsafeXXX_InternalExtensions(map[int32]proto.Extension{"
|
||||
keys := make([]int, 0, len(e))
|
||||
for k := range e {
|
||||
keys = append(keys, int(k))
|
||||
}
|
||||
sort.Ints(keys)
|
||||
ss := []string{}
|
||||
for _, k := range keys {
|
||||
ss = append(ss, strconv.Itoa(k)+": "+e[int32(k)].GoString())
|
||||
}
|
||||
s += strings.Join(ss, ",") + "})"
|
||||
return s
|
||||
}
|
||||
func (m *Container) Marshal() (dAtA []byte, err error) {
|
||||
size := m.Size()
|
||||
dAtA = make([]byte, size)
|
||||
|
@ -438,7 +397,7 @@ func init() {
|
|||
}
|
||||
|
||||
var fileDescriptorContainer = []byte{
|
||||
// 219 bytes of a gzipped FileDescriptorProto
|
||||
// 215 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xe2, 0x72, 0x48, 0xcf, 0x2c, 0xc9,
|
||||
0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, 0xd5, 0x4f, 0xc9, 0x4f, 0xce, 0x4e, 0x2d, 0xd2, 0x4f, 0xce,
|
||||
0xcf, 0x2b, 0x49, 0xcc, 0xcc, 0x4b, 0x2d, 0x4a, 0xd1, 0x4f, 0x2c, 0xc8, 0xd4, 0x2f, 0xa9, 0x2c,
|
||||
|
@ -449,8 +408,8 @@ var fileDescriptorContainer = []byte{
|
|||
0xa3, 0x06, 0xa7, 0x13, 0xdb, 0xa3, 0x7b, 0xf2, 0x4c, 0x9e, 0x2e, 0x41, 0x4c, 0x99, 0x29, 0x42,
|
||||
0x62, 0x5c, 0x6c, 0x49, 0xa5, 0x79, 0x29, 0x39, 0xa9, 0x12, 0x4c, 0x20, 0xb9, 0x20, 0x28, 0x4f,
|
||||
0xc8, 0x80, 0x8b, 0x15, 0x6c, 0x96, 0x04, 0x8b, 0x02, 0xa3, 0x06, 0x9f, 0x91, 0x94, 0x1e, 0x16,
|
||||
0x17, 0xeb, 0x05, 0x83, 0x54, 0x04, 0x41, 0x14, 0x3a, 0xc9, 0x9c, 0x78, 0x28, 0xc7, 0x70, 0xe3,
|
||||
0xa1, 0x1c, 0xc3, 0x87, 0x87, 0x72, 0x8c, 0x0d, 0x8f, 0xe4, 0x18, 0x4f, 0x3c, 0x92, 0x63, 0xbc,
|
||||
0xf0, 0x48, 0x8e, 0xf1, 0xc1, 0x23, 0x39, 0xc6, 0x24, 0x36, 0xb0, 0x9b, 0x8c, 0x01, 0x01, 0x00,
|
||||
0x00, 0xff, 0xff, 0x4c, 0xd0, 0x44, 0x85, 0x3c, 0x01, 0x00, 0x00,
|
||||
0x17, 0xeb, 0x05, 0x83, 0x54, 0x04, 0x41, 0x14, 0x3a, 0x49, 0x9c, 0x78, 0x28, 0xc7, 0x70, 0xe3,
|
||||
0xa1, 0x1c, 0x43, 0xc3, 0x23, 0x39, 0xc6, 0x13, 0x8f, 0xe4, 0x18, 0x2f, 0x3c, 0x92, 0x63, 0x7c,
|
||||
0xf0, 0x48, 0x8e, 0x31, 0x89, 0x0d, 0xec, 0x1e, 0x63, 0x40, 0x00, 0x00, 0x00, 0xff, 0xff, 0x1f,
|
||||
0x97, 0x28, 0xc5, 0x38, 0x01, 0x00, 0x00,
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue