Skip to content

Commit

Permalink
Merge pull request #12 from DEXPRO-Solutions-GmbH/feat/record-getter
Browse files Browse the repository at this point in the history
Add getter for record fields
  • Loading branch information
fabiante authored Dec 18, 2023
2 parents abad691 + 66fdfa1 commit 4a1516c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions r_get_record.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@ type Record struct {
Attachments []*RecordAttachment `json:"attachments"`
}

// GetHeaderField returns either the value of the given header field or an empty string if the field does not exist.
func (rec *Record) GetHeaderField(name string) string {
return rec.RecordFields[name]
}

type RecordAttachment struct {
Body string `json:"body"`
Name string `json:"name"`
Expand Down

0 comments on commit 4a1516c

Please sign in to comment.