2018-11-28 18:25:20 -08:00
|
|
|
// Copyright 2018 The Go Authors. All rights reserved.
|
|
|
|
// Use of this source code is governed by a BSD-style
|
|
|
|
// license that can be found in the LICENSE file.
|
|
|
|
|
2019-05-14 12:44:37 -07:00
|
|
|
package prototext
|
2018-11-28 18:25:20 -08:00
|
|
|
|
|
|
|
import (
|
2018-12-11 21:08:58 -08:00
|
|
|
"fmt"
|
2018-11-28 18:25:20 -08:00
|
|
|
"sort"
|
2019-04-08 17:32:44 -07:00
|
|
|
"unicode/utf8"
|
2018-11-28 18:25:20 -08:00
|
|
|
|
2019-05-13 23:55:40 -07:00
|
|
|
"google.golang.org/protobuf/internal/encoding/text"
|
|
|
|
"google.golang.org/protobuf/internal/encoding/wire"
|
|
|
|
"google.golang.org/protobuf/internal/errors"
|
|
|
|
"google.golang.org/protobuf/internal/fieldnum"
|
|
|
|
"google.golang.org/protobuf/internal/mapsort"
|
|
|
|
"google.golang.org/protobuf/internal/pragma"
|
|
|
|
"google.golang.org/protobuf/proto"
|
|
|
|
pref "google.golang.org/protobuf/reflect/protoreflect"
|
|
|
|
"google.golang.org/protobuf/reflect/protoregistry"
|
2018-11-28 18:25:20 -08:00
|
|
|
)
|
|
|
|
|
2018-12-06 15:28:53 -08:00
|
|
|
// Marshal writes the given proto.Message in textproto format using default options.
|
2018-11-28 18:25:20 -08:00
|
|
|
func Marshal(m proto.Message) ([]byte, error) {
|
|
|
|
return MarshalOptions{}.Marshal(m)
|
|
|
|
}
|
|
|
|
|
|
|
|
// MarshalOptions is a configurable text format marshaler.
|
|
|
|
type MarshalOptions struct {
|
|
|
|
pragma.NoUnkeyedLiterals
|
|
|
|
|
2019-03-26 16:26:22 -07:00
|
|
|
// AllowPartial allows messages that have missing required fields to marshal
|
|
|
|
// without returning an error. If AllowPartial is false (the default),
|
|
|
|
// Marshal will return error if there are any missing required fields.
|
|
|
|
AllowPartial bool
|
|
|
|
|
2019-03-20 14:04:24 -07:00
|
|
|
// If Indent is a non-empty string, it causes entries for a Message to be
|
|
|
|
// preceded by the indent and trailed by a newline. Indent can only be
|
|
|
|
// composed of space or tab characters.
|
|
|
|
Indent string
|
2019-01-02 15:46:07 -08:00
|
|
|
|
|
|
|
// Resolver is the registry used for type lookups when marshaling out
|
|
|
|
// google.protobuf.Any messages in expanded form. If Resolver is not set,
|
|
|
|
// marshaling will default to using protoregistry.GlobalTypes. If a type is
|
|
|
|
// not found, an Any message will be marshaled as a regular message.
|
|
|
|
Resolver *protoregistry.Types
|
2018-11-28 18:25:20 -08:00
|
|
|
}
|
|
|
|
|
2018-12-06 15:28:53 -08:00
|
|
|
// Marshal writes the given proto.Message in textproto format using options in MarshalOptions object.
|
2018-11-28 18:25:20 -08:00
|
|
|
func (o MarshalOptions) Marshal(m proto.Message) ([]byte, error) {
|
2019-01-02 15:46:07 -08:00
|
|
|
if o.Resolver == nil {
|
|
|
|
o.Resolver = protoregistry.GlobalTypes
|
|
|
|
}
|
|
|
|
|
2018-11-28 18:25:20 -08:00
|
|
|
var nerr errors.NonFatal
|
2019-02-07 20:17:45 -08:00
|
|
|
v, err := o.marshalMessage(m.ProtoReflect())
|
2018-12-06 15:28:53 -08:00
|
|
|
if !nerr.Merge(err) {
|
|
|
|
return nil, err
|
2018-11-28 18:25:20 -08:00
|
|
|
}
|
|
|
|
|
|
|
|
delims := [2]byte{'{', '}'}
|
|
|
|
const outputASCII = false
|
2019-03-20 14:04:24 -07:00
|
|
|
b, err := text.Marshal(v, o.Indent, delims, outputASCII)
|
2018-11-28 18:25:20 -08:00
|
|
|
if !nerr.Merge(err) {
|
|
|
|
return nil, err
|
|
|
|
}
|
2019-04-05 13:31:40 -07:00
|
|
|
if !o.AllowPartial {
|
|
|
|
nerr.Merge(proto.IsInitialized(m))
|
|
|
|
}
|
2018-11-28 18:25:20 -08:00
|
|
|
return b, nerr.E
|
|
|
|
}
|
|
|
|
|
|
|
|
// marshalMessage converts a protoreflect.Message to a text.Value.
|
|
|
|
func (o MarshalOptions) marshalMessage(m pref.Message) (text.Value, error) {
|
|
|
|
var nerr errors.NonFatal
|
|
|
|
var msgFields [][2]text.Value
|
2019-05-01 12:29:25 -07:00
|
|
|
messageDesc := m.Descriptor()
|
2019-01-02 15:46:07 -08:00
|
|
|
|
|
|
|
// Handle Any expansion.
|
2019-05-01 12:29:25 -07:00
|
|
|
if messageDesc.FullName() == "google.protobuf.Any" {
|
2019-01-02 15:46:07 -08:00
|
|
|
msg, err := o.marshalAny(m)
|
|
|
|
if err == nil || nerr.Merge(err) {
|
|
|
|
// Return as is for nil or non-fatal error.
|
|
|
|
return msg, nerr.E
|
|
|
|
}
|
2019-01-03 15:39:58 -08:00
|
|
|
// For other errors, continue on to marshal Any as a regular message.
|
2019-01-02 15:46:07 -08:00
|
|
|
}
|
2018-11-28 18:25:20 -08:00
|
|
|
|
|
|
|
// Handle known fields.
|
2019-05-01 12:29:25 -07:00
|
|
|
fieldDescs := messageDesc.Fields()
|
2018-11-28 18:25:20 -08:00
|
|
|
knownFields := m.KnownFields()
|
|
|
|
size := fieldDescs.Len()
|
|
|
|
for i := 0; i < size; i++ {
|
2018-12-06 15:28:53 -08:00
|
|
|
fd := fieldDescs.Get(i)
|
|
|
|
num := fd.Number()
|
2018-11-28 18:25:20 -08:00
|
|
|
|
2018-12-06 15:28:53 -08:00
|
|
|
if !knownFields.Has(num) {
|
2018-11-28 18:25:20 -08:00
|
|
|
continue
|
|
|
|
}
|
|
|
|
|
2019-02-07 20:17:45 -08:00
|
|
|
name := text.ValueOf(fd.Name())
|
|
|
|
// Use type name for group field name.
|
|
|
|
if fd.Kind() == pref.GroupKind {
|
2019-04-15 23:39:09 -07:00
|
|
|
name = text.ValueOf(fd.Message().Name())
|
2019-02-07 20:17:45 -08:00
|
|
|
}
|
2018-12-06 15:28:53 -08:00
|
|
|
pval := knownFields.Get(num)
|
2018-12-17 17:13:07 -08:00
|
|
|
var err error
|
2019-02-07 20:17:45 -08:00
|
|
|
msgFields, err = o.appendField(msgFields, name, pval, fd)
|
2018-12-17 17:13:07 -08:00
|
|
|
if !nerr.Merge(err) {
|
|
|
|
return text.Value{}, err
|
2018-11-28 18:25:20 -08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-12-17 17:13:07 -08:00
|
|
|
// Handle extensions.
|
|
|
|
var err error
|
|
|
|
msgFields, err = o.appendExtensions(msgFields, knownFields)
|
|
|
|
if !nerr.Merge(err) {
|
|
|
|
return text.Value{}, err
|
|
|
|
}
|
|
|
|
|
|
|
|
// Handle unknown fields.
|
2018-12-11 21:08:58 -08:00
|
|
|
// TODO: Provide option to exclude or include unknown fields.
|
|
|
|
m.UnknownFields().Range(func(_ pref.FieldNumber, raw pref.RawFields) bool {
|
|
|
|
msgFields = appendUnknown(msgFields, raw)
|
|
|
|
return true
|
|
|
|
})
|
|
|
|
|
2018-11-28 18:25:20 -08:00
|
|
|
return text.ValueOf(msgFields), nerr.E
|
|
|
|
}
|
|
|
|
|
2018-12-17 17:13:07 -08:00
|
|
|
// appendField marshals a protoreflect.Value and appends it to the given [][2]text.Value.
|
2019-02-07 20:17:45 -08:00
|
|
|
func (o MarshalOptions) appendField(msgFields [][2]text.Value, name text.Value, pval pref.Value, fd pref.FieldDescriptor) ([][2]text.Value, error) {
|
2018-12-17 17:13:07 -08:00
|
|
|
var nerr errors.NonFatal
|
|
|
|
|
2019-05-13 14:32:56 -07:00
|
|
|
switch {
|
|
|
|
case fd.IsList():
|
|
|
|
items, err := o.marshalList(pval.List(), fd)
|
|
|
|
if !nerr.Merge(err) {
|
|
|
|
return msgFields, err
|
|
|
|
}
|
|
|
|
|
|
|
|
for _, item := range items {
|
|
|
|
msgFields = append(msgFields, [2]text.Value{name, item})
|
|
|
|
}
|
|
|
|
case fd.IsMap():
|
|
|
|
items, err := o.marshalMap(pval.Map(), fd)
|
|
|
|
if !nerr.Merge(err) {
|
|
|
|
return msgFields, err
|
2018-12-17 17:13:07 -08:00
|
|
|
}
|
|
|
|
|
|
|
|
for _, item := range items {
|
2019-02-07 20:17:45 -08:00
|
|
|
msgFields = append(msgFields, [2]text.Value{name, item})
|
2018-12-17 17:13:07 -08:00
|
|
|
}
|
2019-05-13 14:32:56 -07:00
|
|
|
default:
|
2018-12-17 17:13:07 -08:00
|
|
|
tval, err := o.marshalSingular(pval, fd)
|
|
|
|
if !nerr.Merge(err) {
|
|
|
|
return msgFields, err
|
|
|
|
}
|
2019-02-07 20:17:45 -08:00
|
|
|
msgFields = append(msgFields, [2]text.Value{name, tval})
|
2018-12-17 17:13:07 -08:00
|
|
|
}
|
|
|
|
|
|
|
|
return msgFields, nerr.E
|
|
|
|
}
|
|
|
|
|
2018-11-28 18:25:20 -08:00
|
|
|
// marshalSingular converts a non-repeated field value to text.Value.
|
|
|
|
// This includes all scalar types, enums, messages, and groups.
|
|
|
|
func (o MarshalOptions) marshalSingular(val pref.Value, fd pref.FieldDescriptor) (text.Value, error) {
|
|
|
|
kind := fd.Kind()
|
|
|
|
switch kind {
|
|
|
|
case pref.BoolKind,
|
|
|
|
pref.Int32Kind, pref.Sint32Kind, pref.Uint32Kind,
|
|
|
|
pref.Int64Kind, pref.Sint64Kind, pref.Uint64Kind,
|
|
|
|
pref.Sfixed32Kind, pref.Fixed32Kind,
|
|
|
|
pref.Sfixed64Kind, pref.Fixed64Kind,
|
|
|
|
pref.FloatKind, pref.DoubleKind,
|
2019-04-08 17:32:44 -07:00
|
|
|
pref.BytesKind:
|
2018-11-28 18:25:20 -08:00
|
|
|
return text.ValueOf(val.Interface()), nil
|
|
|
|
|
2019-04-08 17:32:44 -07:00
|
|
|
case pref.StringKind:
|
|
|
|
s := val.String()
|
|
|
|
if utf8.ValidString(s) {
|
|
|
|
return text.ValueOf(s), nil
|
|
|
|
}
|
|
|
|
var nerr errors.NonFatal
|
|
|
|
nerr.AppendInvalidUTF8(string(fd.FullName()))
|
|
|
|
return text.ValueOf(s), nerr.E
|
|
|
|
|
2018-11-28 18:25:20 -08:00
|
|
|
case pref.EnumKind:
|
|
|
|
num := val.Enum()
|
2019-04-15 23:39:09 -07:00
|
|
|
if desc := fd.Enum().Values().ByNumber(num); desc != nil {
|
2018-11-28 18:25:20 -08:00
|
|
|
return text.ValueOf(desc.Name()), nil
|
|
|
|
}
|
|
|
|
// Use numeric value if there is no enum description.
|
|
|
|
return text.ValueOf(int32(num)), nil
|
|
|
|
|
|
|
|
case pref.MessageKind, pref.GroupKind:
|
|
|
|
return o.marshalMessage(val.Message())
|
|
|
|
}
|
|
|
|
|
2019-04-03 15:42:41 -07:00
|
|
|
panic(fmt.Sprintf("%v has unknown kind: %v", fd.FullName(), kind))
|
2018-11-28 18:25:20 -08:00
|
|
|
}
|
|
|
|
|
|
|
|
// marshalList converts a protoreflect.List to []text.Value.
|
|
|
|
func (o MarshalOptions) marshalList(list pref.List, fd pref.FieldDescriptor) ([]text.Value, error) {
|
|
|
|
var nerr errors.NonFatal
|
|
|
|
size := list.Len()
|
|
|
|
values := make([]text.Value, 0, size)
|
|
|
|
|
|
|
|
for i := 0; i < size; i++ {
|
|
|
|
item := list.Get(i)
|
|
|
|
val, err := o.marshalSingular(item, fd)
|
|
|
|
if !nerr.Merge(err) {
|
|
|
|
// Return already marshaled values.
|
|
|
|
return values, err
|
|
|
|
}
|
|
|
|
values = append(values, val)
|
|
|
|
}
|
|
|
|
|
|
|
|
return values, nerr.E
|
|
|
|
}
|
|
|
|
|
|
|
|
var (
|
|
|
|
mapKeyName = text.ValueOf(pref.Name("key"))
|
|
|
|
mapValueName = text.ValueOf(pref.Name("value"))
|
|
|
|
)
|
|
|
|
|
|
|
|
// marshalMap converts a protoreflect.Map to []text.Value.
|
|
|
|
func (o MarshalOptions) marshalMap(mmap pref.Map, fd pref.FieldDescriptor) ([]text.Value, error) {
|
|
|
|
var nerr errors.NonFatal
|
|
|
|
// values is a list of messages.
|
|
|
|
values := make([]text.Value, 0, mmap.Len())
|
|
|
|
|
2019-04-03 15:42:41 -07:00
|
|
|
var err error
|
2019-05-13 14:32:56 -07:00
|
|
|
mapsort.Range(mmap, fd.MapKey().Kind(), func(key pref.MapKey, val pref.Value) bool {
|
2019-04-03 15:42:41 -07:00
|
|
|
var keyTxtVal text.Value
|
2019-05-13 14:32:56 -07:00
|
|
|
keyTxtVal, err = o.marshalSingular(key.Value(), fd.MapKey())
|
2018-11-28 18:25:20 -08:00
|
|
|
if !nerr.Merge(err) {
|
|
|
|
return false
|
|
|
|
}
|
2019-04-03 15:42:41 -07:00
|
|
|
var valTxtVal text.Value
|
2019-05-13 14:32:56 -07:00
|
|
|
valTxtVal, err = o.marshalSingular(val, fd.MapValue())
|
2018-11-28 18:25:20 -08:00
|
|
|
if !nerr.Merge(err) {
|
|
|
|
return false
|
|
|
|
}
|
|
|
|
// Map entry (message) contains 2 fields, first field for key and second field for value.
|
|
|
|
msg := text.ValueOf([][2]text.Value{
|
|
|
|
{mapKeyName, keyTxtVal},
|
|
|
|
{mapValueName, valTxtVal},
|
|
|
|
})
|
|
|
|
values = append(values, msg)
|
2019-04-03 15:42:41 -07:00
|
|
|
err = nil
|
2018-11-28 18:25:20 -08:00
|
|
|
return true
|
|
|
|
})
|
2019-04-03 15:42:41 -07:00
|
|
|
if err != nil {
|
|
|
|
return nil, err
|
2018-11-28 18:25:20 -08:00
|
|
|
}
|
|
|
|
|
2019-04-03 15:42:41 -07:00
|
|
|
return values, nerr.E
|
2018-11-28 18:25:20 -08:00
|
|
|
}
|
2018-12-11 21:08:58 -08:00
|
|
|
|
2018-12-17 17:13:07 -08:00
|
|
|
// appendExtensions marshals extension fields and appends them to the given [][2]text.Value.
|
|
|
|
func (o MarshalOptions) appendExtensions(msgFields [][2]text.Value, knownFields pref.KnownFields) ([][2]text.Value, error) {
|
|
|
|
xtTypes := knownFields.ExtensionTypes()
|
|
|
|
xtFields := make([][2]text.Value, 0, xtTypes.Len())
|
|
|
|
|
2019-04-03 15:42:41 -07:00
|
|
|
var nerr errors.NonFatal
|
2018-12-17 17:13:07 -08:00
|
|
|
var err error
|
|
|
|
xtTypes.Range(func(xt pref.ExtensionType) bool {
|
2019-05-01 12:29:25 -07:00
|
|
|
name := xt.Descriptor().FullName()
|
2019-01-07 18:56:57 -08:00
|
|
|
// If extended type is a MessageSet, set field name to be the message type name.
|
|
|
|
if isMessageSetExtension(xt) {
|
2019-05-01 12:29:25 -07:00
|
|
|
name = xt.Descriptor().Message().FullName()
|
2019-01-07 18:56:57 -08:00
|
|
|
}
|
2018-12-17 17:13:07 -08:00
|
|
|
|
2019-05-01 12:29:25 -07:00
|
|
|
num := xt.Descriptor().Number()
|
2018-12-17 17:13:07 -08:00
|
|
|
if knownFields.Has(num) {
|
|
|
|
// Use string type to produce [name] format.
|
2019-01-07 18:56:57 -08:00
|
|
|
tname := text.ValueOf(string(name))
|
2018-12-17 17:13:07 -08:00
|
|
|
pval := knownFields.Get(num)
|
2019-05-01 12:29:25 -07:00
|
|
|
xtFields, err = o.appendField(xtFields, tname, pval, xt.Descriptor())
|
2019-04-03 15:42:41 -07:00
|
|
|
if !nerr.Merge(err) {
|
2018-12-17 17:13:07 -08:00
|
|
|
return false
|
|
|
|
}
|
2019-04-03 15:42:41 -07:00
|
|
|
err = nil
|
2018-12-17 17:13:07 -08:00
|
|
|
}
|
|
|
|
return true
|
|
|
|
})
|
2019-04-03 15:42:41 -07:00
|
|
|
if err != nil {
|
2018-12-17 17:13:07 -08:00
|
|
|
return msgFields, err
|
|
|
|
}
|
|
|
|
|
|
|
|
// Sort extensions lexicographically and append to output.
|
|
|
|
sort.SliceStable(xtFields, func(i, j int) bool {
|
|
|
|
return xtFields[i][0].String() < xtFields[j][0].String()
|
|
|
|
})
|
|
|
|
return append(msgFields, xtFields...), nerr.E
|
|
|
|
}
|
|
|
|
|
2019-01-07 18:56:57 -08:00
|
|
|
// isMessageSetExtension reports whether extension extends a message set.
|
|
|
|
func isMessageSetExtension(xt pref.ExtensionType) bool {
|
2019-05-01 12:29:25 -07:00
|
|
|
xd := xt.Descriptor()
|
|
|
|
if xd.Name() != "message_set_extension" {
|
2019-01-07 18:56:57 -08:00
|
|
|
return false
|
|
|
|
}
|
2019-05-01 12:29:25 -07:00
|
|
|
md := xd.Message()
|
2019-04-15 23:39:09 -07:00
|
|
|
if md == nil {
|
2019-01-07 18:56:57 -08:00
|
|
|
return false
|
|
|
|
}
|
2019-05-01 12:29:25 -07:00
|
|
|
if xd.FullName().Parent() != md.FullName() {
|
2019-01-07 18:56:57 -08:00
|
|
|
return false
|
|
|
|
}
|
2019-05-13 14:32:56 -07:00
|
|
|
xmd, ok := xd.ContainingMessage().(interface{ IsMessageSet() bool })
|
2019-04-15 23:39:09 -07:00
|
|
|
return ok && xmd.IsMessageSet()
|
2019-01-07 18:56:57 -08:00
|
|
|
}
|
|
|
|
|
2018-12-11 21:08:58 -08:00
|
|
|
// appendUnknown parses the given []byte and appends field(s) into the given fields slice.
|
|
|
|
// This function assumes proper encoding in the given []byte.
|
|
|
|
func appendUnknown(fields [][2]text.Value, b []byte) [][2]text.Value {
|
|
|
|
for len(b) > 0 {
|
|
|
|
var value interface{}
|
|
|
|
num, wtype, n := wire.ConsumeTag(b)
|
|
|
|
b = b[n:]
|
|
|
|
|
|
|
|
switch wtype {
|
|
|
|
case wire.VarintType:
|
|
|
|
value, n = wire.ConsumeVarint(b)
|
|
|
|
case wire.Fixed32Type:
|
|
|
|
value, n = wire.ConsumeFixed32(b)
|
|
|
|
case wire.Fixed64Type:
|
|
|
|
value, n = wire.ConsumeFixed64(b)
|
|
|
|
case wire.BytesType:
|
|
|
|
value, n = wire.ConsumeBytes(b)
|
|
|
|
case wire.StartGroupType:
|
|
|
|
var v []byte
|
|
|
|
v, n = wire.ConsumeGroup(num, b)
|
|
|
|
var msg [][2]text.Value
|
|
|
|
value = appendUnknown(msg, v)
|
|
|
|
default:
|
|
|
|
panic(fmt.Sprintf("error parsing unknown field wire type: %v", wtype))
|
|
|
|
}
|
|
|
|
|
|
|
|
fields = append(fields, [2]text.Value{text.ValueOf(uint32(num)), text.ValueOf(value)})
|
|
|
|
b = b[n:]
|
|
|
|
}
|
|
|
|
return fields
|
|
|
|
}
|
2019-01-02 15:46:07 -08:00
|
|
|
|
|
|
|
// marshalAny converts a google.protobuf.Any protoreflect.Message to a text.Value.
|
|
|
|
func (o MarshalOptions) marshalAny(m pref.Message) (text.Value, error) {
|
|
|
|
var nerr errors.NonFatal
|
|
|
|
knownFields := m.KnownFields()
|
2019-04-03 15:42:41 -07:00
|
|
|
typeURL := knownFields.Get(fieldnum.Any_TypeUrl).String()
|
|
|
|
value := knownFields.Get(fieldnum.Any_Value)
|
2019-01-02 15:46:07 -08:00
|
|
|
|
2019-01-04 14:08:41 -08:00
|
|
|
emt, err := o.Resolver.FindMessageByURL(typeURL)
|
2019-01-02 15:46:07 -08:00
|
|
|
if !nerr.Merge(err) {
|
|
|
|
return text.Value{}, err
|
|
|
|
}
|
2019-01-09 02:57:13 -08:00
|
|
|
em := emt.New().Interface()
|
2019-01-02 15:46:07 -08:00
|
|
|
// TODO: Need to set types registry in binary unmarshaling.
|
2019-05-06 18:45:33 -07:00
|
|
|
// TODO: If binary unmarshaling returns required not set error, need to
|
|
|
|
// return another required not set error that contains both the path to this
|
|
|
|
// field and the path inside the embedded message.
|
2019-04-03 12:17:24 -07:00
|
|
|
err = proto.UnmarshalOptions{
|
|
|
|
AllowPartial: o.AllowPartial,
|
|
|
|
}.Unmarshal(value.Bytes(), em)
|
2019-01-02 15:46:07 -08:00
|
|
|
if !nerr.Merge(err) {
|
|
|
|
return text.Value{}, err
|
|
|
|
}
|
|
|
|
|
|
|
|
msg, err := o.marshalMessage(em.ProtoReflect())
|
|
|
|
if !nerr.Merge(err) {
|
|
|
|
return text.Value{}, err
|
|
|
|
}
|
2019-01-04 14:08:41 -08:00
|
|
|
// Expanded Any field value contains only a single field with the type_url field value as the
|
|
|
|
// field name in [] and a text marshaled field value of the embedded message.
|
2019-01-02 15:46:07 -08:00
|
|
|
msgFields := [][2]text.Value{
|
|
|
|
{
|
2019-01-04 14:08:41 -08:00
|
|
|
text.ValueOf(typeURL),
|
2019-01-02 15:46:07 -08:00
|
|
|
msg,
|
|
|
|
},
|
|
|
|
}
|
|
|
|
return text.ValueOf(msgFields), nerr.E
|
|
|
|
}
|