本文整理汇总了Golang中limbo/services/protobuf/proto.CompactTextString函数的典型用法代码示例。如果您正苦于以下问题:Golang CompactTextString函数的具体用法?Golang CompactTextString怎么用?Golang CompactTextString使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了CompactTextString函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Golang代码示例。
示例1: TestIndexQueryProtoCompactText
func TestIndexQueryProtoCompactText(t *testing.T) {
seed := time.Now().UnixNano()
popr := math_rand.New(math_rand.NewSource(seed))
p := NewPopulatedIndexQuery(popr, true)
data := github_com_gogo_protobuf_proto.CompactTextString(p)
msg := &IndexQuery{}
if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil {
t.Fatalf("seed = %d, err = %v", seed, err)
}
if !p.Equal(msg) {
t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p)
}
}
示例2: TestSampleOneOfProtoCompactText
func TestSampleOneOfProtoCompactText(t *testing.T) {
seed := time.Now().UnixNano()
popr := math_rand.New(math_rand.NewSource(seed))
p := NewPopulatedSampleOneOf(popr, true)
data := github_com_gogo_protobuf_proto.CompactTextString(p)
msg := &SampleOneOf{}
if err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil {
t.Fatalf("seed = %d, err = %v", seed, err)
}
if err := p.VerboseEqual(msg); err != nil {
t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err)
}
if !p.Equal(msg) {
t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p)
}
}
示例3: String
func (m *Maps) String() string { return proto.CompactTextString(m) }
示例4: String
func (m *TestRequest) String() string { return proto.CompactTextString(m) }
示例5: String
func (m *FetchOptions) String() string { return proto.CompactTextString(m) }
示例6: String
func (m *Object) String() string { return proto.CompactTextString(m) }
示例7: String
func (m *OnlyEnums) String() string { return proto.CompactTextString(m) }
示例8: String
func (m *ColumnDescriptor) String() string { return proto.CompactTextString(m) }
示例9: String
func (m *MessageWithMap) String() string { return proto.CompactTextString(m) }
示例10: String
func (m *CodeGeneratorRequest) String() string { return proto.CompactTextString(m) }
示例11: String
func (m *MyType) String() string { return proto.CompactTextString(m) }
示例12: TestCompactText
func TestCompactText(t *testing.T) {
s := proto.CompactTextString(newTestMessage())
if s != compactText {
t.Errorf("Got:\n===\n%v===\nExpected:\n===\n%v\n===\n", s, compactText)
}
}
示例13: String
func (m *MoreDefaultsA) String() string { return proto.CompactTextString(m) }
示例14: String
func (m *AuthzRule) String() string { return proto.CompactTextString(m) }
示例15: String
func (m *Timestamp) String() string { return proto.CompactTextString(m) }