ryandotsmith/l2met — pull request #89 by BRMatt (2013-08-04 17:26:32+00:00)
Title: master branch breaks if METCHAN_URL not specified

```
$ go run main.go

panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xb code=0x1 addr=0x8 pc=0x4af2d3]

goroutine 1 [running]:
net/url.(*URL).String(0x0, 0xc2000ab500, 0x0)
/usr/local/go/src/pkg/net/url/url.go:445 +0x33
github.com/ryandotsmith/l2met/metchan.New(0x655e00, 0x0, 0x0)
/home/matt/.go/src/github.com/ryandotsmith/l2met/metchan/metchan.go:58 +0x40
main.main()
/home/matt/code/l2met/main.go:34 +0x74

goroutine 2 [syscall]:
exit status 2
```

```
$ METCHAN_URL="https://user:password@example.com" go run main.go
at=initialized-mem-store
```

By the looks of things the meta channel constructed in `main()` is passed around to a few places, so it probably wouldn't be a good idea to pass them a nil reference. I'm a little rusty with go, but am I right in thinking one could create an interface which both `metchan.Channel` and some other `metchan.fake.Channel` could implement to hide the fact a metchan hasn't been configured?