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:
Kujtim Hoxha
2025-06-30 14:13:08 +02:00
parent 2a10ac99f7
commit 9eab1ba11e
2 changed files with 4 additions and 4 deletions

View File

@@ -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

View File

@@ -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 == "" {