From 6b38e95bbae8b8b957628b6de410f69fc93edb8e Mon Sep 17 00:00:00 2001 From: Chris Bednarski Date: Wed, 25 Feb 2015 02:37:57 -0800 Subject: [PATCH] Fixed add, remove is now failing the test (as expected) --- hostlist.go | 1 + hostlist_test.go | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/hostlist.go b/hostlist.go index c79cc09..2cfa440 100644 --- a/hostlist.go +++ b/hostlist.go @@ -55,6 +55,7 @@ func (h *Hostlist) Add(host *Hostname) error { host.Domain, host.Ip, found.Ip)) } } + *h = append(*h, host) return nil } diff --git a/hostlist_test.go b/hostlist_test.go index d065863..aa4e059 100644 --- a/hostlist_test.go +++ b/hostlist_test.go @@ -53,6 +53,6 @@ func TestRemove(t *testing.T) { // } if hosts.ContainsDomain("google.com") { - t.Errorf("Expected not to find google.com in %s", hosts) + t.Errorf("Expected not to find google.com") } }