-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
preview diff/commit for changes #3380
base: master
Are you sure you want to change the base?
Conversation
@@ -1,6 +1,6 @@ | |||
module github.com/99designs/gqlgen | |||
|
|||
go 1.22.5 | |||
go 1.23 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey, can you make sure you don't upgrade this by mistake?
@@ -274,6 +275,21 @@ func Call(p *types.Func) string { | |||
return pkg + p.Name() | |||
} | |||
|
|||
func dict(values ...interface{}) (map[string]interface{}, error) { | |||
if len(values)%2 != 0 { | |||
return nil, fmt.Errorf("invalid dict call: arguments must be key-value pairs") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
return nil, fmt.Errorf("invalid dict call: arguments must be key-value pairs") | |
return nil, errors.New("invalid dict call: arguments must be key-value pairs") |
for i := 0; i < len(values); i += 2 { | ||
key, ok := values[i].(string) | ||
if !ok { | ||
return nil, fmt.Errorf("dict keys must be strings") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
return nil, fmt.Errorf("dict keys must be strings") | |
return nil, errors.New("dict keys must be strings") |
preview diff