MCPcopy Index your code
hub / github.com/google/go-github / WithVersion

Function WithVersion

github/github.go:769–773  ·  view source on GitHub ↗

WithVersion overrides the GitHub v3 API version for this individual request. For more information, see: https://github.blog/2022-11-28-to-infinity-and-beyond-enabling-the-future-of-githubs-rest-api-with-api-versioning/

(version string)

Source from the content-addressed store, hash-verified

767// For more information, see:
768// https://github.blog/2022-11-28-to-infinity-and-beyond-enabling-the-future-of-githubs-rest-api-with-api-versioning/
769func WithVersion(version string) RequestOption {
770 return func(req *http.Request) {
771 req.Header.Set(headerAPIVersion, version)
772 }
773}
774
775// NewRequest creates an API request. A relative URL can be provided in urlStr,
776// in which case it is resolved relative to the BaseURL of the Client.

Calls

no outgoing calls

Tested by 3

TestNewRequestFunction · 0.68
TestNewFormRequestFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…