hashicorp/serf — pull request #180 by ryanuber (2014-03-13 17:26:28+00:00)
Title: Tag Persistence

I meant to add this a while back but never got to it. This should allow us to persist tags to a JSON file using the `-tags-file` option or `tags_file` config option.

I have made it so that the `-tag` option and passing tags in via config will result in an error at agent start time. This is to preserve previous functionality while still allowing for a tags file to be used, and not trying to do some weird tag merging business.

I have added some tests - but having trouble in `agent_test.go` when trying to use `a.Serf().LocalMember()` to get a local member object. This seems to work in other places, but I might be doing something wrong. Any help would be appreciated.

```
--- FAIL: TestAgentTagsFile (0.03 seconds)
panic: runtime error: invalid memory address or nil pointer dereference [recovered]
panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xb code=0x1 addr=0x0 pc=0x4e5079]

goroutine 58 [running]:
runtime.panic(0x809a80, 0xd7c6a8)
/usr/lib64/golang/src/pkg/runtime/panic.c:266 +0xb6
testing.func·005()
/usr/lib64/golang/src/pkg/testing/testing.go:385 +0xe8
runtime.panic(0x809a80, 0xd7c6a8)
/usr/lib64/golang/src/pkg/runtime/panic.c:248 +0x106
github.com/hashicorp/serf/serf.(*Serf).LocalMember(0x0, 0x0, 0x0, 0x0, 0x0, ...)
/home/ryanuber/go/src/github.com/hashicorp/serf/serf/serf.go:661 +0xe9
github.com/hashicorp/serf/command/agent.TestAgentTagsFile(0xc210057bd0)
/home/ryanuber/go/src/github.com/hashicorp/serf/command/agent/agent_test.go:151 +0x699
...
...
```