on main help sign in
fix: lint for var blocks
3839c36Raphael Amorim
internal/llm/provider/anthropic.go+2−4
@@ -21,10 +21,8 @@ import (
21 "github.com/charmbracelet/crush/internal/message"
21 "github.com/charmbracelet/crush/internal/message"
22)
22)
23
23
24−var (
25− // Pre-compiled regex for parsing context limit errors.
24+// Pre-compiled regex for parsing context limit errors.
26− contextLimitRegex = regexp.MustCompile(`input length and ` + "`max_tokens`" + ` exceed context limit: (\d+) \+ (\d+) > (\d+)`)
25+var contextLimitRegex = regexp.MustCompile(`input length and ` + "`max_tokens`" + ` exceed context limit: (\d+) \+ (\d+) > (\d+)`)
27−)
28
26
29type anthropicClient struct {
27type anthropicClient struct {
30 providerOptions providerClientOptions
28 providerOptions providerClientOptions
internal/tui/exp/list/filterable_group.go+3−5
@@ -15,11 +15,9 @@ import (
15 "github.com/sahilm/fuzzy"
15 "github.com/sahilm/fuzzy"
16)
16)
17
17
18−var (
19− // Pre-compiled regex for checking if a string is alphanumeric.
18+// Pre-compiled regex for checking if a string is alphanumeric.
20− // Note: This is duplicated from filterable.go to avoid circular dependencies.
19+// Note: This is duplicated from filterable.go to avoid circular dependencies.
21− alphanumericRegexGroup = regexp.MustCompile(`^[a-zA-Z0-9]*$`)
20+var alphanumericRegexGroup = regexp.MustCompile(`^[a-zA-Z0-9]*$`)
22−)
23
21
24type FilterableGroupList[T FilterableItem] interface {
22type FilterableGroupList[T FilterableItem] interface {
25 GroupedList[T]
23 GroupedList[T]