style(backend): gofmt -w on 85 files (whitespace only)

backend-ci.yml's `test -z "$(gofmt -l .)"` strict gate (added in
13c21ac11) failed on a backlog of unformatted files. None of the
85 files in this commit had been edited since the gate was added
because no push touched veza-backend-api/** in between, so the
gate never fired until today's CI fixes triggered it.

The diff is exclusively whitespace alignment in struct literals
and trailing-space comments. `go build ./...` and the full test
suite (with VEZA_SKIP_INTEGRATION=1 -short) pass identically.
This commit is contained in:
senke 2026-04-14 12:22:14 +02:00
parent eb97cad991
commit a1000ce7fb
86 changed files with 790 additions and 769 deletions

View file

@ -129,4 +129,3 @@ const playlistsMapping = `{
}
}
}`

View file

@ -9,8 +9,8 @@ import (
"go.uber.org/zap"
"gorm.io/gorm"
apperrors "veza-backend-api/internal/errors"
"veza-backend-api/internal/core/marketplace"
apperrors "veza-backend-api/internal/errors"
)
// AdminTransferHandler handles admin transfer dashboard endpoints (v0.701).

View file

@ -0,0 +1,27 @@
package handlers
import (
"encoding/json"
"testing"
)
// FuzzLoginPayload fuzzes the login request parsing.
// The handler should never panic on any input.
func FuzzLoginPayload(f *testing.F) {
f.Add([]byte(`{"email":"test@test.com","password":"Pass123!"}`))
f.Add([]byte(`{"email":"","password":""}`))
f.Add([]byte(`{}`))
f.Add([]byte(`invalid json`))
f.Add([]byte(""))
f.Add([]byte(`{"email":null,"password":123}`))
f.Add([]byte(`{"email":"a@b.c","password":"` + string(make([]byte, 10000)) + `"}`))
f.Fuzz(func(t *testing.T, data []byte) {
// Verify that JSON parsing of arbitrary payloads never panics
var payload struct {
Email string `json:"email"`
Password string `json:"password"`
}
_ = json.Unmarshal(data, &payload)
})
}

View file

@ -3,9 +3,9 @@ package handlers
import (
"net/http"
apperrors "veza-backend-api/internal/errors"
"veza-backend-api/internal/models"
"veza-backend-api/internal/repositories"
apperrors "veza-backend-api/internal/errors"
chatws "veza-backend-api/internal/websocket/chat"

View file

@ -4,8 +4,8 @@ import (
"net/http"
"strconv"
"veza-backend-api/internal/services"
apperrors "veza-backend-api/internal/errors"
"veza-backend-api/internal/services"
"github.com/gin-gonic/gin"
)

View file

@ -4,8 +4,8 @@ import (
"errors"
"net/http"
apperrors "veza-backend-api/internal/errors"
"veza-backend-api/internal/core/marketplace"
apperrors "veza-backend-api/internal/errors"
"veza-backend-api/internal/services"
"github.com/gin-gonic/gin"

View file

@ -5,9 +5,9 @@ import (
"net/http"
"time"
apperrors "veza-backend-api/internal/errors"
"veza-backend-api/internal/services"
"veza-backend-api/internal/types"
apperrors "veza-backend-api/internal/errors"
"github.com/gin-gonic/gin"
"github.com/google/uuid"

View file

@ -5,9 +5,9 @@ import (
"net/http"
"veza-backend-api/internal/core/social"
"veza-backend-api/internal/utils"
apperrors "veza-backend-api/internal/errors"
"veza-backend-api/internal/pagination"
"veza-backend-api/internal/utils"
"github.com/gin-gonic/gin"
"github.com/google/uuid"

View file

@ -80,4 +80,3 @@ func setCacheHeaders(c *gin.Context, rule CacheRule) {
c.Header("Cache-Control", strings.Join(parts, ", "))
}
}

View file

@ -104,4 +104,3 @@ func TestDefaultCacheHeadersConfig(t *testing.T) {
t.Error("missing API rule")
}
}

View file

@ -15,8 +15,8 @@ import (
"github.com/gin-gonic/gin"
"github.com/google/uuid"
"golang.org/x/crypto/bcrypt"
"go.uber.org/zap"
"golang.org/x/crypto/bcrypt"
"gorm.io/driver/sqlite"
"gorm.io/gorm"

View file

@ -561,4 +561,3 @@ func TestLoad_UploadStatusPolling(t *testing.T) {
assert.Equal(t, concurrentPolls, successCount, "All status polls should succeed")
assert.Less(t, totalTime, 5*time.Second, "Status polling should complete quickly")
}

View file

@ -790,4 +790,3 @@ func TestMarketplaceFlow_CreateOrder_InactiveProduct(t *testing.T) {
assert.Equal(t, http.StatusBadRequest, w.Code)
}

View file

@ -644,4 +644,3 @@ func BenchmarkTrackGet(b *testing.B) {
router.ServeHTTP(w, req)
}
}