From 08ce092713bcc9a5dad7f65df4c2d9f27a54c703 Mon Sep 17 00:00:00 2001 From: Evan Phoenix Date: Fri, 22 May 2015 16:33:38 -0700 Subject: [PATCH] Add the host tag always. Fixes #4 --- agent.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/agent.go b/agent.go index 42fe44356..3ba6b69c8 100644 --- a/agent.go +++ b/agent.go @@ -46,14 +46,14 @@ func NewAgent(config *Config) (*Agent, error) { } agent.Hostname = hostname - - if config.Tags == nil { - config.Tags = map[string]string{} - } - - config.Tags["host"] = agent.Hostname } + if config.Tags == nil { + config.Tags = map[string]string{} + } + + config.Tags["host"] = agent.Hostname + return agent, nil }