Fix some fucking stupid type issues
This commit is contained in:
8
db.go
8
db.go
@@ -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
2
go.mod
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user