core/util.go (18 lines of code) (raw):

package core import ( "context" "golang.org/x/oauth2" "net/http" ) func reverseSlice(s []LanguageSize) { for i, j := 0, len(s)-1; i < j; i, j = i+1, j-1 { s[i], s[j] = s[j], s[i] } } func newOauthClient(token string) *http.Client { ctx := context.Background() ts := oauth2.StaticTokenSource( &oauth2.Token{AccessToken: token}, ) return oauth2.NewClient(ctx, ts) }