Skip to content

Commit

Permalink
Re-add removed Record.GetHeaderField getter
Browse files Browse the repository at this point in the history
  • Loading branch information
fabiante committed Feb 2, 2024
1 parent f53a55e commit 4e6dde4
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions record.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,15 @@ type Record struct {
Attachments []*RecordAttachment `xml:"attachment"`
}

func (r *Record) GetHeaderFieldVal(name string) string {
for _, field := range r.Fields {
if field.Name == name {
return field.Value
}
}
return ""
}

type RecordField struct {
Name string `xml:"name,attr"`
Value string `xml:",chardata"`
Expand Down

0 comments on commit 4e6dde4

Please sign in to comment.