Exemple #1
0
func (this *Castaway) String() string {
	if this == nil {
		return "nil"
	}
	keysForCastMapValueMessage := make([]int32, 0, len(this.CastMapValueMessage))
	for k := range this.CastMapValueMessage {
		keysForCastMapValueMessage = append(keysForCastMapValueMessage, k)
	}
	github_com_maditya_protobuf_sortkeys.Int32s(keysForCastMapValueMessage)
	mapStringForCastMapValueMessage := "map[int32]MyWilson{"
	for _, k := range keysForCastMapValueMessage {
		mapStringForCastMapValueMessage += fmt.Sprintf("%v: %v,", k, this.CastMapValueMessage[k])
	}
	mapStringForCastMapValueMessage += "}"
	keysForCastMapValueMessageNullable := make([]int32, 0, len(this.CastMapValueMessageNullable))
	for k := range this.CastMapValueMessageNullable {
		keysForCastMapValueMessageNullable = append(keysForCastMapValueMessageNullable, k)
	}
	github_com_maditya_protobuf_sortkeys.Int32s(keysForCastMapValueMessageNullable)
	mapStringForCastMapValueMessageNullable := "map[int32]*MyWilson{"
	for _, k := range keysForCastMapValueMessageNullable {
		mapStringForCastMapValueMessageNullable += fmt.Sprintf("%v: %v,", k, this.CastMapValueMessageNullable[k])
	}
	mapStringForCastMapValueMessageNullable += "}"
	s := strings.Join([]string{`&Castaway{`,
		`CastMapValueMessage:` + mapStringForCastMapValueMessage + `,`,
		`CastMapValueMessageNullable:` + mapStringForCastMapValueMessageNullable + `,`,
		`XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
		`}`,
	}, "")
	return s
}
Exemple #2
0
func (this *Castaway) GoString() string {
	if this == nil {
		return "nil"
	}
	s := make([]string, 0, 6)
	s = append(s, "&castvalue.Castaway{")
	keysForCastMapValueMessage := make([]int32, 0, len(this.CastMapValueMessage))
	for k := range this.CastMapValueMessage {
		keysForCastMapValueMessage = append(keysForCastMapValueMessage, k)
	}
	github_com_maditya_protobuf_sortkeys.Int32s(keysForCastMapValueMessage)
	mapStringForCastMapValueMessage := "map[int32]MyWilson{"
	for _, k := range keysForCastMapValueMessage {
		mapStringForCastMapValueMessage += fmt.Sprintf("%#v: %#v,", k, this.CastMapValueMessage[k])
	}
	mapStringForCastMapValueMessage += "}"
	if this.CastMapValueMessage != nil {
		s = append(s, "CastMapValueMessage: "+mapStringForCastMapValueMessage+",\n")
	}
	keysForCastMapValueMessageNullable := make([]int32, 0, len(this.CastMapValueMessageNullable))
	for k := range this.CastMapValueMessageNullable {
		keysForCastMapValueMessageNullable = append(keysForCastMapValueMessageNullable, k)
	}
	github_com_maditya_protobuf_sortkeys.Int32s(keysForCastMapValueMessageNullable)
	mapStringForCastMapValueMessageNullable := "map[int32]*MyWilson{"
	for _, k := range keysForCastMapValueMessageNullable {
		mapStringForCastMapValueMessageNullable += fmt.Sprintf("%#v: %#v,", k, this.CastMapValueMessageNullable[k])
	}
	mapStringForCastMapValueMessageNullable += "}"
	if this.CastMapValueMessageNullable != nil {
		s = append(s, "CastMapValueMessageNullable: "+mapStringForCastMapValueMessageNullable+",\n")
	}
	if this.XXX_unrecognized != nil {
		s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n")
	}
	s = append(s, "}")
	return strings.Join(s, "")
}