diff options
author | HimbeerserverDE <himbeerserverde@gmail.com> | 2022-10-16 15:56:45 +0200 |
---|---|---|
committer | HimbeerserverDE <himbeerserverde@gmail.com> | 2022-10-16 15:56:45 +0200 |
commit | 88b7b17a278f8cd0c8a3f269ec05990bd2863d5e (patch) | |
tree | e19c8d7484d161e8f18ed758672a6085064c9352 | |
parent | b25e45a85cdb453dc59636fb852f6d87e1e7869c (diff) |
omit empty record info
fixes record updates
-rw-r--r-- | nameserver.go | 22 |
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. |