mirror of
https://github.com/charmbracelet/crush.git
synced 2025-08-02 05:20:46 +03:00
fix: resolve golangci-lint issues
- Fix gofumpt formatting in models.go - Replace deprecated database methods with context-aware versions: - db.Ping() -> db.PingContext() - db.Exec() -> db.ExecContext() - db.Begin() -> db.BeginTx() - Update Taskfile.yaml to match CI lint configuration
This commit is contained in:
@@ -6,12 +6,12 @@ tasks:
|
||||
lint:
|
||||
desc: Run base linters
|
||||
cmds:
|
||||
- golangci-lint run
|
||||
- golangci-lint run --path-mode=abs --config=".golangci.yml" --timeout=5m
|
||||
|
||||
lint-fix:
|
||||
desc: Run base linters and fix issues
|
||||
cmds:
|
||||
- golangci-lint run --fix
|
||||
- golangci-lint run --path-mode=abs --config=".golangci.yml" --timeout=5m --fix
|
||||
|
||||
test:
|
||||
desc: Run tests
|
||||
|
||||
@@ -219,7 +219,7 @@ func (m *modelDialogCmp) SetModelType(modelType int) tea.Cmd {
|
||||
providers := config.Providers()
|
||||
modelItems := []util.Model{}
|
||||
selectIndex := 0
|
||||
|
||||
|
||||
cfg := config.Get()
|
||||
var currentModel config.PreferredModel
|
||||
if m.modelType == LargeModelType {
|
||||
@@ -227,7 +227,7 @@ func (m *modelDialogCmp) SetModelType(modelType int) tea.Cmd {
|
||||
} else {
|
||||
currentModel = cfg.Models.Small
|
||||
}
|
||||
|
||||
|
||||
for _, provider := range providers {
|
||||
name := provider.Name
|
||||
if name == "" {
|
||||
|
||||
Reference in New Issue
Block a user