Refactor code to use 'any' type and improve context handling
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2026-02-18 16:16:27 +11:00
parent 6517a30fa2
commit f2d6b3158b
36 changed files with 197 additions and 175 deletions

View File

@@ -27,7 +27,7 @@ func acquireSnapshotProbe(ctx context.Context) (func(), error) {
}
}
func boolStringFromInterface(value interface{}) string {
func boolStringFromInterface(value any) string {
switch v := value.(type) {
case nil:
return ""
@@ -164,7 +164,7 @@ func SnapshotTooSoon(prevUnix, currUnix int64, expectedSeconds int64) bool {
}
// querySnapshotRows builds a SELECT with proper rebind for the given table/columns/where.
func querySnapshotRows(ctx context.Context, dbConn *sqlx.DB, table string, columns []string, where string, args ...interface{}) (*sqlx.Rows, error) {
func querySnapshotRows(ctx context.Context, dbConn *sqlx.DB, table string, columns []string, where string, args ...any) (*sqlx.Rows, error) {
if err := db.ValidateTableName(table); err != nil {
return nil, err
}