style: run gofmt across entire codebase

330 non-vendor files had minor formatting inconsistencies
(comment alignment, whitespace). No logic changes.
This commit is contained in:
Houmgaor
2026-02-23 21:28:30 +01:00
parent 385b974adc
commit 48639942f6
330 changed files with 1841 additions and 1809 deletions

View File

@@ -3,8 +3,8 @@ package api
import (
"context"
"database/sql"
"erupe-ce/common/token"
"errors"
"erupe-ce/common/token"
"fmt"
"time"

View File

@@ -67,11 +67,11 @@ func TestUserIDFromTokenScenarios(t *testing.T) {
// TestGetReturnExpiryCalculation tests the return expiry calculation logic
func TestGetReturnExpiryCalculation(t *testing.T) {
tests := []struct {
name string
lastLogin time.Time
currentTime time.Time
shouldUpdate bool
description string
name string
lastLogin time.Time
currentTime time.Time
shouldUpdate bool
description string
}{
{
name: "RecentLogin",
@@ -126,10 +126,10 @@ func TestGetReturnExpiryCalculation(t *testing.T) {
// TestCharacterCreationConstraints tests character creation constraints
func TestCharacterCreationConstraints(t *testing.T) {
tests := []struct {
name string
currentCount int
allowCreation bool
description string
name string
currentCount int
allowCreation bool
description string
}{
{
name: "NoCharacters",
@@ -170,22 +170,22 @@ func TestCharacterCreationConstraints(t *testing.T) {
// TestCharacterDeletionLogic tests the character deletion behavior
func TestCharacterDeletionLogic(t *testing.T) {
tests := []struct {
name string
name string
isNewCharacter bool
expectedAction string
description string
description string
}{
{
name: "NewCharacterDeletion",
isNewCharacter: true,
expectedAction: "DELETE",
description: "New characters should be hard deleted",
description: "New characters should be hard deleted",
},
{
name: "FinalizedCharacterDeletion",
isNewCharacter: false,
expectedAction: "SOFT_DELETE",
description: "Finalized characters should be soft deleted (marked as deleted)",
description: "Finalized characters should be soft deleted (marked as deleted)",
},
}
@@ -367,10 +367,10 @@ func TestCreateLoginTokenContext(t *testing.T) {
// TestPasswordValidation tests password validation logic
func TestPasswordValidation(t *testing.T) {
tests := []struct {
name string
password string
isValid bool
reason string
name string
password string
isValid bool
reason string
}{
{
name: "NormalPassword",

View File

@@ -10,8 +10,8 @@ import (
"testing"
"time"
cfg "erupe-ce/config"
"erupe-ce/common/gametime"
cfg "erupe-ce/config"
"go.uber.org/zap"
)
@@ -150,9 +150,9 @@ func TestLoginEndpointEmptyCredentials(t *testing.T) {
}
tests := []struct {
name string
username string
password string
name string
username string
password string
wantPanic bool // Note: will panic without real DB
}{
{"EmptyUsername", "", "password", true},