alicebob/q — pull request #3 by robx (2014-12-01 22:16:19+00:00)
Title: Use interface{} instead of string for messages.

Works fine. It is quite a bit slower, though.

```
eddie-2:q robert$ git checkout interface
Switched to branch 'interface'
eddie-2:q robert$ go test -bench=.
PASS
BenchmarkSeq	2	672172384 ns/op
BenchmarkMulti	2	644447159 ns/op
BenchmarkStarved	20	93181965 ns/op
ok	github.com/alicebob/q	18.798s
eddie-2:q robert$ git checkout master
Switched to branch 'master'
Your branch is up-to-date with 'origin/master'.
eddie-2:q robert$ go test -bench=.
PASS
BenchmarkSeq	5	304341172 ns/op
BenchmarkMulti	5	316937706 ns/op
BenchmarkStarved	20	69330462 ns/op
ok	github.com/alicebob/q	12.507s
```

Regardless, I don't think it's quite ready to merge in the current state, since it's quite easy to not notice problems with un-gobbable things. You'll only get logged error messages once the queue is actually written to disk, no proper errors either.

I'm thinking of providing some kind of test function that should be passed an empty value of the type, and which we serialize and deserialize and return any errors. We might also/alternatively want to add an interface{} argument to the constructor that handles this. I'm unclear on whether we could even handle the gob registration then.