mirror of
https://github.com/status-im/consul.git
synced 2025-01-10 22:06:20 +00:00
Make sure we omit the Kind value in JSON if empty
This commit is contained in:
parent
01f82717b4
commit
163fe11101
@ -14,7 +14,7 @@ import (
|
||||
// ServiceDefinition is used to JSON decode the Service definitions. For
|
||||
// documentation on specific fields see NodeService which is better documented.
|
||||
type ServiceDefinition struct {
|
||||
Kind ServiceKind
|
||||
Kind ServiceKind `json:",omitempty"`
|
||||
ID string
|
||||
Name string
|
||||
Tags []string
|
||||
|
@ -512,7 +512,7 @@ type NodeService struct {
|
||||
// Kind is the kind of service this is. Different kinds of services may
|
||||
// have differing validation, DNS behavior, etc. An empty kind will default
|
||||
// to the Default kind. See ServiceKind for the full list of kinds.
|
||||
Kind ServiceKind
|
||||
Kind ServiceKind `json:",omitempty"`
|
||||
|
||||
ID string
|
||||
Service string
|
||||
|
Loading…
x
Reference in New Issue
Block a user