Upgrade to go 1.19 and update dependencies (#3069)

* Update to go 1.19
* Update dependencies
* Update cross-compile script
* Add missing targets to cross-compile-all
* Update cache action to remove warning
This commit is contained in:
WithoutPants
2022-11-04 13:41:26 +11:00
committed by GitHub
parent f25881a3bf
commit bba7c23957
939 changed files with 101336 additions and 43819 deletions

View File

@@ -11,6 +11,6 @@ install:
- # Do nothing. This is needed to prevent default install action "go get -t -v ./..." from happening here (we want it to happen inside script step).
script:
- go get -t -v ./...
- diff -u <(echo -n) <(gofmt -d -s .)
- go tool vet .
- diff -n <(echo -n) <(gofmt -d -s .)
- go vet ./...
- go test -v -race ./...

View File

@@ -7,8 +7,6 @@ Package `graphql` provides a GraphQL client implementation.
For more information, see package [`github.com/shurcooL/githubv4`](https://github.com/shurcooL/githubv4), which is a specialized version targeting GitHub GraphQL API v4. That package is driving the feature development.
**Status:** In active early research and development. The API will change when opportunities for improvement are discovered; it is not yet frozen.
Installation
------------

View File

@@ -4,8 +4,5 @@
// which is a specialized version targeting GitHub GraphQL API v4.
// That package is driving the feature development.
//
// Status: In active early research and development. The API will change when
// opportunities for improvement are discovered; it is not yet frozen.
//
// For now, see README for more details.
package graphql // import "github.com/shurcooL/graphql"

View File

@@ -180,8 +180,6 @@ func isTwoInitialisms(word string) (string, string, bool) {
// Only add entries that are highly unlikely to be non-initialisms.
// For instance, "ID" is fine (Freudian code is rare), but "AND" is not.
var initialisms = map[string]struct{}{
// These are the common initialisms from golint. Keep them in sync
// with https://gotools.org/github.com/golang/lint#commonInitialisms.
"ACL": {},
"API": {},
"ASCII": {},
@@ -201,6 +199,7 @@ var initialisms = map[string]struct{}{
"RAM": {},
"RHS": {},
"RPC": {},
"RSS": {},
"SLA": {},
"SMTP": {},
"SQL": {},
@@ -211,18 +210,15 @@ var initialisms = map[string]struct{}{
"UDP": {},
"UI": {},
"UID": {},
"UUID": {},
"URI": {},
"URL": {},
"UTF8": {},
"UUID": {},
"VM": {},
"XML": {},
"XMPP": {},
"XSRF": {},
"XSS": {},
// Additional common initialisms.
"RSS": {},
}
// isBrand reports whether word is a brand.
@@ -237,4 +233,9 @@ func isBrand(word string) (string, bool) {
// Only add entries that are highly unlikely to be non-brands.
var brands = map[string]string{
"github": "GitHub",
"gitlab": "GitLab",
"devops": "DevOps", // For https://en.wikipedia.org/wiki/DevOps.
// For https://docs.github.com/en/graphql/reference/enums#fundingplatform.
"issuehunt": "IssueHunt",
"lfx": "LFX",
}

View File

@@ -280,10 +280,9 @@ func hasGraphQLName(f reflect.StructField, name string) bool {
// GraphQL fragment. It doesn't have a name.
return false
}
if i := strings.Index(value, "("); i != -1 {
value = value[:i]
}
if i := strings.Index(value, ":"); i != -1 {
// Cut off anything that follows the field name,
// such as field arguments, aliases, directives.
if i := strings.IndexAny(value, "(:@"); i != -1 {
value = value[:i]
}
return strings.TrimSpace(value) == name