Fix examples

This commit is contained in:
2016-07-27 00:05:34 +02:00
parent 5e2ce03913
commit cf973483d5
4 changed files with 9 additions and 10 deletions
@@ -14,8 +14,8 @@ type NumberPrinter struct {
// Startup sets up panic handler and starts enqueuing number printing jobs.
func (n *NumberPrinter) Startup() {
n.HandlePanics(func(err interface{}) {
n.Logf("Oh, crap! There was a panic, take a look: %v", err)
n.HandlePanics(func(err error) {
n.Logf("Oh, crap! There was a panic, take a look: %s", err.Error())
})
n.LimitRate(3, time.Second)
@@ -3,12 +3,12 @@ package daemons
import (
"time"
"github.com/localhots/shezmu"
"github.com/localhots/shezmu/consumer"
)
// PriceConsumer consumes price update messages and prints them to the console.
type PriceConsumer struct {
shezmu.BaseDaemon
consumer.Consumer
}
// PriceUpdate describes a price update message.