Fix some fucking stupid type issues

This commit is contained in:
2026-01-24 23:25:45 +01:00
parent 6eb0cad899
commit 058db2a6e2
2 changed files with 5 additions and 5 deletions

8
db.go
View File

@@ -276,13 +276,13 @@ func (db *DBWrapper) QueryFits(params QueryParams) (*FitStatistics, error) {
defer rows.Close()
for rows.Next() {
var id int64
var id int32
var shipCount uint64
if err := rows.Scan(&id, &shipCount); err != nil {
errChan <- fmt.Errorf("failed to scan ship breakdown row: %w", err)
return
}
stats.ShipBreakdown[id] = int64(shipCount)
stats.ShipBreakdown[int64(id)] = int64(shipCount)
}
errChan <- nil
}()
@@ -298,13 +298,13 @@ func (db *DBWrapper) QueryFits(params QueryParams) (*FitStatistics, error) {
defer rows.Close()
for rows.Next() {
var id int64
var id int32
var count uint64
if err := rows.Scan(&id, &count); err != nil {
errChan <- fmt.Errorf("failed to scan system breakdown row: %w", err)
return
}
stats.SystemBreakdown[id] = int64(count)
stats.SystemBreakdown[int64(id)] = int64(count)
}
errChan <- nil
}()

2
go.mod
View File

@@ -8,7 +8,6 @@ require (
git.site.quack-lab.dev/dave/cylogger v1.5.0
git.site.quack-lab.dev/dave/cyutils v1.5.0
github.com/ClickHouse/clickhouse-go/v2 v2.42.0
github.com/hexops/valast v1.5.0
github.com/stretchr/testify v1.11.1
golang.org/x/sync v0.19.0
gorm.io/driver/sqlite v1.6.0
@@ -24,6 +23,7 @@ require (
github.com/go-faster/errors v0.7.1 // indirect
github.com/google/go-cmp v0.7.0 // indirect
github.com/google/uuid v1.6.0 // indirect
github.com/hexops/valast v1.5.0 // indirect
github.com/jinzhu/inflection v1.0.0 // indirect
github.com/jinzhu/now v1.1.5 // indirect
github.com/klauspost/compress v1.18.0 // indirect