Skip to content

Commit

Permalink
Add Title field to RecordRequest
Browse files Browse the repository at this point in the history
  • Loading branch information
fabiante committed Feb 13, 2024
1 parent b0a87ee commit 7367c7e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions template_record.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ import (
const recordTemplateStr = `<?xml version="1.0"?>
<records xmlns="http://namespace.otris.de/2010/09/archive/recordExtern">
<record>
{{- if .Title}}
<title>{{.Title}}</title>
{{end}}
{{- range $key, $value := .Fields}}
<field name="{{$key}}">{{$value}}</field>{{end}}{{range $key, $value := .Attachments}}
<attachment>
Expand Down Expand Up @@ -42,6 +45,7 @@ func init() {
}

type RecordRequest struct {
Title string
Fields map[string]string
Attachments []*RecordRequestAttachment
}
Expand Down

0 comments on commit 7367c7e

Please sign in to comment.