commit | 7536f0fd13f752a3fb3ed0aa3e8ed64a0e81a2bc | [log] [tgz] |
---|---|---|
author | Dmitri Shuralyov <shurcooL@gmail.com> | Thu Jul 03 00:11:40 2014 -0700 |
committer | Dmitri Shuralyov <shurcooL@gmail.com> | Fri Jul 04 10:50:11 2014 -0700 |
tree | 91fcbc5b68b53d73fd1348230da5ad4e712006a8 | |
parent | 8a2cadf44776ea3515bf2063b738d9aabcd301b3 [diff] |
Fix getGitHubDir failing sometimes because it didn't respect GitHub API pagination. Fix #174. If the response contains a Link header, then fallback to requesting "refs/heads/master" and "refs/tags/go1" by name. Use Go style for type naming. See https://github.com/golang/gddo/pull/178#discussion_r14546920. Modify to getJSON to return (*http.Response, error). Check for the link header in GitHub specific code. Excellent suggestions from https://github.com/golang/gddo/pull/178#issuecomment-48007781. Thanks @garyburd!