Skip to content

Instantly share code, notes, and snippets.

@tj
Created February 13, 2015 22:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tj/525d705e76734da5e2c6 to your computer and use it in GitHub Desktop.
Save tj/525d705e76734da5e2c6 to your computer and use it in GitHub Desktop.
type Worker struct {
*context.Context
}
func (w *Worker) SomeMethod(){
...
w.Stats.IncrBy(n, "events", "published")
w.Log.Info("parsed %s in %s (size=%s) (events=%d)", file, time.Since(start), size, n)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment