The RepositoryContent struct doesn't quite map to the API because it is
missing a download link. This link is very useful because while the API
doesn't allow large files to be downloaded, the link allows the raw
files to be downloaded outside the API.
Unfortunately this is a breaking change, and having a pointer to a slice
is not very common, but is needed in this case to allow clearing an
issue's labels.
Fixes#181
This fixes issue where if user has tab width other than 4, some lines will become misaligned. For example, see the package description at https://godoc.org/github.com/gorilla/mux.
Since Goji accepts the underlying version of this type (i.e., the raw
function), and since it doesn't use web.Handler in the same way as the
net/http ecosystem uses http.Handler, there's really no reason to ever
use web.HandlerFunc.
This is a breaking change. Developers who previously used the
web.HandlerFunc type are encouraged to inline it into their own
projects.
This change exposes a new type, Match, which represents a matched route.
When present in the Goji environment (bound to the key MatchKey),
routing will be skipped and the bound Match will be dispatched to
instead.
In addition, the Goji router has been exposed as a middleware using the
Match mechanism above. This allows middleware inserted after the router
access to the Match object and any bound URLParams.
Fixes#76. See also #32.
Introduce Make() which is an alias for Parse() and returns a version as value. New() changed to return a pointer.
Breaking changes:
Change New() to Make() to fix pointer vs value problem.
This replaces the enormous free-form docstring at the top with something
that's at least syntax highlighted and collapsible. I'm a little worried
about discoverability, but "oh well."
In order to expose a convenient API, it's unfortunately necessary to
lean on Go's interface{} quite a bit: in reality we only accept a
handful of types at each call site, but it's impossible to express this
using the type system.
Prior to this commit (as well as the ParsePattern commit), I exposed all
of this type information in the form of an enormous comment on web.Mux,
however this was pretty gross. Instead, let's use "vanity" type aliases
for interface{} to provide documentation about which types are accepted
where. This will hopefully make the API documentation easier to skim,
but doesn't affect any existing uses of Goji.
This commit also clarifies a couple other parts of the documentation.
This is a major breaking change to web.C, the Goji context object. The
Env key has been changed from a map[string]interface{} to a
map[interface{}]interface{} in order to better support package-private
environment values and to make the context value more compatible with
golang.org/x/net/context's Context.
Since strings support equality, most existing uses of web.C should
continue to function. Users who construct Env by hand (i.e., by calling
"make") will need to update their code as instructed by their compiler.
Users who iterate over the environment will need to update their code to
take into account the fact that keys may no longer be strings.
Uses simple JSON string (un)marshaling under the
hood and Parse() on validating unmarshaled content.
Docker-DCO-1.1-Signed-off-by: Josh Hawn <josh.hawn@docker.com> (github: jlhawn)