chore: run go fix for Go 1.26 modernization
CI / Go vulnerabilities (push) Successful in 1m10s
CI / Build & Vet (push) Successful in 1m39s
CI / Frontend build (gate) (push) Successful in 1m42s
CI / Frontend QC (audit) (push) Successful in 56s
CI / Frontend QC (typecheck) (push) Successful in 1m36s
CI / Frontend QC (lint) (push) Successful in 1m51s
CI / Tests (prod) (push) Has been cancelled
CI / Tests (dev) (push) Has been cancelled
CI / Race (prod) (push) Has been cancelled
CI / Race (dev) (push) Has been cancelled

106 files: interface{}→any, strings.Split→SplitSeq, CutPrefix/Cut, strings.Builder, slices.Contains, remove redundant // +build directives, gofmt import ordering and indentation.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This commit is contained in:
2026-07-09 17:25:23 +01:00
co-authored by Sisyphus
parent ef26bd59e9
commit 510828c924
107 changed files with 882 additions and 745 deletions
+10 -10
View File
@@ -11,8 +11,8 @@ import (
"strings"
"time"
"crussell/db"
"crussell/clock"
"crussell/db"
"crussell/internal/square"
"crussell/internal/validators"
"crussell/mw"
@@ -160,7 +160,7 @@ func GetGiftCards(w http.ResponseWriter, r *http.Request) {
}
var gcTotal int
var gcListArgs []interface{}
var gcListArgs []any
gcListQuery := fmt.Sprintf(`
SELECT id, total_funds_added, amount_remaining, created_at, is_inventory
@@ -170,7 +170,7 @@ func GetGiftCards(w http.ResponseWriter, r *http.Request) {
if searchTerm != "" {
searchPattern := "%" + searchTerm + "%"
gcListArgs = []interface{}{searchPattern}
gcListArgs = []any{searchPattern}
if cursorStr != "" {
cursorCreatedAt, cursorID, err := validators.ParseCursor(cursorStr)
@@ -202,7 +202,7 @@ func GetGiftCards(w http.ResponseWriter, r *http.Request) {
// transaction (single connection).
gcTotal = 0
if whereSQL != "" {
countArgs := []interface{}{}
countArgs := []any{}
if searchTerm != "" {
countArgs = append(countArgs, "%"+searchTerm+"%")
}
@@ -243,7 +243,7 @@ func GetGiftCards(w http.ResponseWriter, r *http.Request) {
var ubTotal int
var ubListQuery string
var ubListArgs []interface{}
var ubListArgs []any
if searchTerm != "" {
searchPattern := "%" + searchTerm + "%"
@@ -258,7 +258,7 @@ func GetGiftCards(w http.ResponseWriter, r *http.Request) {
OR u.email ILIKE $1
ORDER BY b.updated_at DESC
`
ubListArgs = []interface{}{searchPattern}
ubListArgs = []any{searchPattern}
} else {
ubListQuery = `
SELECT
@@ -267,7 +267,7 @@ func GetGiftCards(w http.ResponseWriter, r *http.Request) {
JOIN users u ON b.user_id = u.id
ORDER BY b.updated_at DESC
`
ubListArgs = []interface{}{}
ubListArgs = []any{}
}
ubRows, err := db.Conn.Query(ctx, ubListQuery, ubListArgs...)
@@ -736,7 +736,7 @@ func RedeemGiftCard(w http.ResponseWriter, r *http.Request) {
}
w.WriteHeader(http.StatusOK)
json.NewEncoder(w).Encode(map[string]interface{}{
json.NewEncoder(w).Encode(map[string]any{
"status": "success",
"amount_redeemed": amountRemaining,
})
@@ -1065,7 +1065,7 @@ func BuyGiftCard(w http.ResponseWriter, r *http.Request) {
}
w.WriteHeader(http.StatusCreated)
json.NewEncoder(w).Encode(map[string]interface{}{
json.NewEncoder(w).Encode(map[string]any{
"status": "success",
"code": cardID,
"amount": amountPounds,
@@ -1137,7 +1137,7 @@ func GetExpiredBalances(w http.ResponseWriter, r *http.Request) {
balances = []ExpiredBalance{}
}
json.NewEncoder(w).Encode(map[string]interface{}{
json.NewEncoder(w).Encode(map[string]any{
"expired_balances": balances,
"total": len(balances),
})