Skip to content

Commit

Permalink
Change header keys to be canonical (#3389)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexandear authored Dec 16, 2024
1 parent 7bc4871 commit 7beb0aa
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
1 change: 1 addition & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ run:
timeout: 10m
linters:
enable:
- canonicalheader
- dogsled
- dupl
- gocritic
Expand Down
12 changes: 6 additions & 6 deletions github/github.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 7beb0aa

Please sign in to comment.