bradfitz / go-issue-mirror

[old] precursor to golang.org/x/build/maintner/godata
24 stars 2 forks source link

cmd/servegoissues: Update to use context from http.Request. #6

Closed dmitshur closed 8 years ago

dmitshur commented 8 years ago

The change in shurcooL/issuesapp@59c941fc1f14849f78d2c5f34544f3ae6c82593e has made issuesapp.Options.Context unneccessary. Remove it.

This API simplification is made possible by the change in Go 1.7 where each http.Request comes with a context associated with it. Previously, an external library (such as github.com/gorilla/context) had to be used to provide this functionality, and so one of the options was to specify how to extract a context from an *http.Request.

Since it's a part of the standard library, it's possible for everyone to use it, and this no longer needs to be provided externally or customizable.

Fixes #8.

dmitshur commented 8 years ago

@bradfitz Please review and merge, this fixes #8.

If it makes it easier for you, feel free to give me push rights to this repo and I will gladly help maintain it. The API of issuesapp is functional but very suboptimal. I want to keep making it better until it's incredible, so there will be more minor PRs like this one.

bradfitz commented 8 years ago

If it makes it easier for you, feel free to give me push rights to this repo and I will gladly help maintain it.

I'd actually prefer that this repo be purely data and no code, and servegoissues live in what was supposed to be the generic counterpart to this repo: github.com/bradfitz/issuemirror

Maybe we can move servegoissues there (leaving a pointer in this repo) and I can give you access to that one? I'd like this repo to be only updated by a bot regularly.

dmitshur commented 8 years ago

Maybe we can move servegoissues there (leaving a pointer in this repo) and I can give you access to that one? I'd like this repo to be only updated by a bot regularly.

That makes sense and sounds good to me. Whatever you think is best/easiest.