generic json for fix messages
This commit is contained in:
@ -89,6 +89,24 @@ func (m FieldMap) Get(parser Field) MessageRejectError {
|
||||
return m.GetField(parser.Tag(), parser)
|
||||
}
|
||||
|
||||
// RawValues returns a copy of the underlying TagValue slice for a tag.
|
||||
// For repeating groups, the first entry is the count and the remaining
|
||||
// entries are the flattened inner-field values across all repetitions.
|
||||
func (m FieldMap) RawValues(tag Tag) []TagValue {
|
||||
m.rwLock.RLock()
|
||||
defer m.rwLock.RUnlock()
|
||||
|
||||
f, ok := m.tagLookup[tag]
|
||||
if !ok {
|
||||
return nil
|
||||
}
|
||||
|
||||
out := make([]TagValue, len(f))
|
||||
copy(out, f)
|
||||
|
||||
return out
|
||||
}
|
||||
|
||||
// Has returns true if the Tag is present in this FieldMap.
|
||||
func (m FieldMap) Has(tag Tag) bool {
|
||||
m.rwLock.RLock()
|
||||
|
||||
Reference in New Issue
Block a user