From 92353791f19777f00b1955e4fc188b59090d7ce3 Mon Sep 17 00:00:00 2001 From: rerorero Date: Sat, 19 Oct 2019 01:34:48 +0900 Subject: [PATCH 1/2] remove duplicated json tag --- agent/config/config.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/agent/config/config.go b/agent/config/config.go index 483cbe9a6627..b713cbf5bdd6 100644 --- a/agent/config/config.go +++ b/agent/config/config.go @@ -610,7 +610,7 @@ type Performance struct { type Telemetry struct { CirconusAPIApp *string `json:"circonus_api_app,omitempty" hcl:"circonus_api_app" mapstructure:"circonus_api_app"` - CirconusAPIToken *string `json:"circonus_api_token,omitempty" json:"-" hcl:"circonus_api_token" mapstructure:"circonus_api_token" json:"-"` + CirconusAPIToken *string `json:"circonus_api_token,omitempty" hcl:"circonus_api_token" mapstructure:"circonus_api_token"` CirconusAPIURL *string `json:"circonus_api_url,omitempty" hcl:"circonus_api_url" mapstructure:"circonus_api_url"` CirconusBrokerID *string `json:"circonus_broker_id,omitempty" hcl:"circonus_broker_id" mapstructure:"circonus_broker_id"` CirconusBrokerSelectTag *string `json:"circonus_broker_select_tag,omitempty" hcl:"circonus_broker_select_tag" mapstructure:"circonus_broker_select_tag"` From 14a8ae5f10e5159c03a976dfb39c58f97f778ee9 Mon Sep 17 00:00:00 2001 From: rerorero Date: Sat, 19 Oct 2019 01:58:19 +0900 Subject: [PATCH 2/2] fix: incorrect wait group usage --- command/debug/debug.go | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/command/debug/debug.go b/command/debug/debug.go index a9697b624a09..c6642faf68c2 100644 --- a/command/debug/debug.go +++ b/command/debug/debug.go @@ -428,9 +428,8 @@ func (c *cmd) captureDynamic() error { s = 1 } + wgProf.Add(1) go func() { - wgProf.Add(1) - prof, err := c.client.Debug().Profile(int(s)) if err != nil { errCh <- err @@ -444,9 +443,8 @@ func (c *cmd) captureDynamic() error { wgProf.Done() }() + wgProf.Add(1) go func() { - wgProf.Add(1) - trace, err := c.client.Debug().Trace(int(s)) if err != nil { errCh <- err