-
Notifications
You must be signed in to change notification settings - Fork 251
Bump Go to 1.26.0 #1697
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
Bump Go to 1.26.0 #1697
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -105,7 +105,7 @@ func validateConfig(cfg *latest.Config) error { | |
| for name := range cfg.Models { | ||
| if cfg.Models[name].ParallelToolCalls == nil { | ||
| m := cfg.Models[name] | ||
| m.ParallelToolCalls = boolPtr(true) | ||
| m.ParallelToolCalls = new(true) | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Invalid syntax: new() called with a value instead of a type The expression The field t := true
m.ParallelToolCalls = &tOr use a helper function that returns
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hahahahah |
||
| cfg.Models[name] = m | ||
| } | ||
| } | ||
|
|
@@ -134,10 +134,6 @@ func validateConfig(cfg *latest.Config) error { | |
| return nil | ||
| } | ||
|
|
||
| func boolPtr(b bool) *bool { | ||
| return &b | ||
| } | ||
|
|
||
| // providerAPITypes are the allowed values for api_type in provider configs | ||
| var providerAPITypes = map[string]bool{ | ||
| "": true, // empty is allowed (defaults to openai_chatcompletions) | ||
|
|
||
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.
Invalid syntax: new() called with fmt.Sprintf expression instead of a type
The expression
new(fmt.Sprintf("Maximum iterations (%d) reached", e.MaxIterations))is invalid Go syntax. Thenew()builtin accepts only a type expression (e.g.,new(string)), not a value-producing function call.fmt.Sprintf()returns a string value, not a type. This will fail to compile.The correct approach would be:
Or use the
acp.Ptr()helper function if available (as seen elsewhere in the codebase):Looking at line 753 in the same file, you correctly use
&titlefor string pointers.