on main help sign in
fix: lint for var blocks
commit3839c364d601edf602dcff50a862b993661a4b40 authorRaphael Amorim <rapha850@gmail.com> dateWed 30 Jul 2025, 11:28 (1 year ago) parent760e5c4
2 files changed+5−9
internal/llm/provider/anthropic.go+2−4 internal/tui/exp/list/filterable_group.go+3−5
internal/llm/provider/anthropic.go+2−4
@@ -21,10 +21,8 @@ import (
2121 "github.com/charmbracelet/crush/internal/message"
2222)
2323
24−var (
25− // Pre-compiled regex for parsing context limit errors.
26− contextLimitRegex = regexp.MustCompile(`input length and ` + "`max_tokens`" + ` exceed context limit: (\d+) \+ (\d+) > (\d+)`)
27−)
24+// Pre-compiled regex for parsing context limit errors.
25+var contextLimitRegex = regexp.MustCompile(`input length and ` + "`max_tokens`" + ` exceed context limit: (\d+) \+ (\d+) > (\d+)`)
2826
2927type anthropicClient struct {
3028 providerOptions providerClientOptions
internal/tui/exp/list/filterable_group.go+3−5
@@ -15,11 +15,9 @@ import (
1515 "github.com/sahilm/fuzzy"
1616)
1717
18−var (
19− // Pre-compiled regex for checking if a string is alphanumeric.
20− // Note: This is duplicated from filterable.go to avoid circular dependencies.
21− alphanumericRegexGroup = regexp.MustCompile(`^[a-zA-Z0-9]*$`)
22−)
18+// Pre-compiled regex for checking if a string is alphanumeric.
19+// Note: This is duplicated from filterable.go to avoid circular dependencies.
20+var alphanumericRegexGroup = regexp.MustCompile(`^[a-zA-Z0-9]*$`)
2321
2422type FilterableGroupList[T FilterableItem] interface {
2523 GroupedList[T]