From 4319b06dd219a140db1f10779d42bd7d914c7e07 Mon Sep 17 00:00:00 2001 From: Fabian Reinartz Date: Wed, 24 Jun 2015 16:22:52 +0200 Subject: [PATCH] config: add omitempty for consul SD config. --- config/config.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/config/config.go b/config/config.go index c3494c7655..7214c80b4b 100644 --- a/config/config.go +++ b/config/config.go @@ -389,12 +389,12 @@ func (c *FileSDConfig) UnmarshalYAML(unmarshal func(interface{}) error) error { // ConsulSDConfig is the configuration for Consul service discovery. type ConsulSDConfig struct { Server string `yaml:"server"` - Token string `yaml:"token"` - Datacenter string `yaml:"datacenter"` - TagSeparator string `yaml:"tag_separator"` - Scheme string `yaml:"scheme"` - Username string `yaml:"username"` - Password string `yaml:"password"` + Token string `yaml:"token,omitempty"` + Datacenter string `yaml:"datacenter,omitempty"` + TagSeparator string `yaml:"tag_separator,omitempty"` + Scheme string `yaml:"scheme,omitempty"` + Username string `yaml:"username,omitempty"` + Password string `yaml:"password,omitempty"` // The list of services for which targets are discovered. Services []string `yaml:"services"`