aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHimbeerserverDE <himbeerserverde@gmail.com>2022-10-16 15:56:45 +0200
committerHimbeerserverDE <himbeerserverde@gmail.com>2022-10-16 15:56:45 +0200
commit88b7b17a278f8cd0c8a3f269ec05990bd2863d5e (patch)
treee19c8d7484d161e8f18ed758672a6085064c9352
parentb25e45a85cdb453dc59636fb852f6d87e1e7869c (diff)
omit empty record info
fixes record updates
-rw-r--r--nameserver.go22
1 files changed, 11 insertions, 11 deletions
diff --git a/nameserver.go b/nameserver.go
index 98f03d9..a7177cc 100644
--- a/nameserver.go
+++ b/nameserver.go
@@ -55,17 +55,17 @@ const (
// A RecordInfo contains DNS as well as INWX specific record information.
type RecordInfo struct {
- Name string `json:"name"`
- Type RecordType `json:"type"`
- Content string `json:"content"`
- TTL int `json:"ttl"`
- Priority int `json:"prio"`
- URLRedirectType URLRdrType `json:"urlRedirectType"`
- URLRedirectTitle string `json:"urlRedirectTitle"`
- URLRedirectDesc string `json:"urlRedirectDescription"`
- URLRedirectKeywords string `json:"urlRedirectKeywords"`
- URLRedirectFavIcon string `json:"urlRedirectFavIcon"`
- URLAppend bool `json:"urlAppend"`
+ Name string `json:"name,omitempty"`
+ Type RecordType `json:"type,omitempty"`
+ Content string `json:"content,omitempty"`
+ TTL int `json:"ttl,omitempty"`
+ Priority int `json:"prio,omitempty"`
+ URLRedirectType URLRdrType `json:"urlRedirectType,omitempty"`
+ URLRedirectTitle string `json:"urlRedirectTitle,omitempty"`
+ URLRedirectDesc string `json:"urlRedirectDescription,omitempty"`
+ URLRedirectKeywords string `json:"urlRedirectKeywords,omitempty"`
+ URLRedirectFavIcon string `json:"urlRedirectFavIcon,omitempty"`
+ URLAppend bool `json:"urlAppend,omitempty"`
}
// A NSRecord consists of an ID and RecordInfo.