diff --git a/.golangci.yml b/.golangci.yml index 17e42f8f1cb..52d2e04ddf8 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -4,6 +4,7 @@ run: timeout: 10m linters: enable: + - canonicalheader - dogsled - dupl - gocritic diff --git a/github/github.go b/github/github.go index 7cdd73eb25e..7069a18e053 100644 --- a/github/github.go +++ b/github/github.go @@ -35,14 +35,14 @@ const ( defaultUserAgent = "go-github" + "/" + Version uploadBaseURL = "https://uploads.github.com/" - headerAPIVersion = "X-GitHub-Api-Version" - headerRateLimit = "X-RateLimit-Limit" - headerRateRemaining = "X-RateLimit-Remaining" - headerRateReset = "X-RateLimit-Reset" - headerOTP = "X-GitHub-OTP" + headerAPIVersion = "X-Github-Api-Version" + headerRateLimit = "X-Ratelimit-Limit" + headerRateRemaining = "X-Ratelimit-Remaining" + headerRateReset = "X-Ratelimit-Reset" + headerOTP = "X-Github-Otp" headerRetryAfter = "Retry-After" - headerTokenExpiration = "GitHub-Authentication-Token-Expiration" + headerTokenExpiration = "Github-Authentication-Token-Expiration" mediaTypeV3 = "application/vnd.github.v3+json" defaultMediaType = "application/octet-stream"