MCPcopy
hub / github.com/gogo/protobuf / String

Method String

types/type.pb.go:2176–2200  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

2174 return s
2175}
2176func (this *Field) String() string {
2177 if this == nil {
2178 return "nil"
2179 }
2180 repeatedStringForOptions := "[]*Option{"
2181 for _, f := range this.Options {
2182 repeatedStringForOptions += strings.Replace(f.String(), "Option", "Option", 1) + ","
2183 }
2184 repeatedStringForOptions += "}"
2185 s := strings.Join([]string{`&Field{`,
2186 `Kind:` + fmt.Sprintf("%v", this.Kind) + `,`,
2187 `Cardinality:` + fmt.Sprintf("%v", this.Cardinality) + `,`,
2188 `Number:` + fmt.Sprintf("%v", this.Number) + `,`,
2189 `Name:` + fmt.Sprintf("%v", this.Name) + `,`,
2190 `TypeUrl:` + fmt.Sprintf("%v", this.TypeUrl) + `,`,
2191 `OneofIndex:` + fmt.Sprintf("%v", this.OneofIndex) + `,`,
2192 `Packed:` + fmt.Sprintf("%v", this.Packed) + `,`,
2193 `Options:` + repeatedStringForOptions + `,`,
2194 `JsonName:` + fmt.Sprintf("%v", this.JsonName) + `,`,
2195 `DefaultValue:` + fmt.Sprintf("%v", this.DefaultValue) + `,`,
2196 `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
2197 `}`,
2198 }, "")
2199 return s
2200}
2201func (this *Enum) String() string {
2202 if this == nil {
2203 return "nil"

Callers

nothing calls this directly

Calls 1

StringMethod · 0.65

Tested by

no test coverage detected