It turns out WriterProxy is pretty generally useful, especially when
defining custom http loggers. Expose it in a util package so that other
packages can use it.
If you're manipulating your middleware stack concurrently with active
requests you're probably doing something wrong, and it's not worth
either the complexity or runtime cost to support you hitting yourself.
We can probably take this principle a bit further and disallow mutating
the middleware stack after any requests have been made (which will
eliminate even more complexity) but that can be a project for another
day.
App Engine disallows package unsafe. As a workaround for the (unsafe)
RCU atomic pointer shenanigans we pull in order to avoid taking a lock
in the hot routing path, let's just grab the lock. Honestly, I doubt
anyone will notice anyways, especially considering the fact that App
Engine is single-threaded anyways.
Fixes#52.
Previously, a state machine invalidation could have raced against an
in-flight routing attempt: if the invalidation occured after the routing
attempt had already completed its nil-check (choosing not to compile a
new state machine) but before the state machine was atomically loaded to
perform routing, the routing goroutine would begin to panic from
dereferencing nil.
The meat of this change is that we now return the state machine that we
compiled (while still holding the lock), and we only ever interact with
the state machine through atomic pointer loads.
The input and response types for commit messages differ in the API.
While commit.Tree and commit.Parents are objects with fields when
returned by the GitHub API, the attributes are plain strings when
creating new commits.
See: https://developer.github.com/v3/git/commits/#create-a-commit
Expose an additional function, bind.WithFlag(), which allows callers to
use the previously-default "global flag" mode.
This change allows the bind string parser (etc.) to be used without
unwanted side effects. The behavior of the top-level "goji" package has
not been changed.
Fixes#47.