style(project): format Go with gofmt, set up Prettier for the frontend
Run gofmt -w across the backend, normalising the manually-aligned := blocks to the gofmt standard. No code behaviour changes. Add Prettier (+ prettier-plugin-svelte) to the frontend with the SvelteKit default config (tabs, single quotes) so formatting is reproducible, then run it over the whole tree. Add format / format:check npm scripts and a .prettierignore (build output, generated schema.ts, static assets). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -10,14 +10,14 @@ import (
|
||||
"tanabata/backend/internal/port"
|
||||
)
|
||||
|
||||
const categoryObjectType = "category"
|
||||
const categoryObjectTypeID int16 = 3 // third row in 007_seed_data.sql object_types
|
||||
const categoryObjectType = "category"
|
||||
const categoryObjectTypeID int16 = 3 // third row in 007_seed_data.sql object_types
|
||||
|
||||
// CategoryParams holds the fields for creating or patching a category.
|
||||
type CategoryParams struct {
|
||||
Name string
|
||||
Notes *string
|
||||
Color *string // nil = no change; pointer to empty string = clear
|
||||
Color *string // nil = no change; pointer to empty string = clear
|
||||
Metadata json.RawMessage
|
||||
IsPublic *bool
|
||||
}
|
||||
@@ -176,4 +176,4 @@ func (s *CategoryService) Delete(ctx context.Context, id uuid.UUID) error {
|
||||
func (s *CategoryService) ListTags(ctx context.Context, categoryID uuid.UUID, params port.OffsetParams) (*domain.TagOffsetPage, error) {
|
||||
params.ViewerID, params.ViewerIsAdmin, _ = domain.UserFromContext(ctx)
|
||||
return s.tags.ListByCategory(ctx, categoryID, params)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -627,4 +627,4 @@ func extractEXIFWithDatetime(data []byte) (json.RawMessage, *time.Time) {
|
||||
dt = &t
|
||||
}
|
||||
return json.RawMessage(b), dt
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@ import (
|
||||
"tanabata/backend/internal/port"
|
||||
)
|
||||
|
||||
const poolObjectType = "pool"
|
||||
const poolObjectType = "pool"
|
||||
const poolObjectTypeID int16 = 4 // fourth row in 007_seed_data.sql object_types
|
||||
|
||||
// PoolParams holds the fields for creating or patching a pool.
|
||||
@@ -238,4 +238,4 @@ func (s *PoolService) Reorder(ctx context.Context, poolID uuid.UUID, fileIDs []u
|
||||
return err
|
||||
}
|
||||
return s.pools.Reorder(ctx, poolID, fileIDs)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,15 +10,15 @@ import (
|
||||
"tanabata/backend/internal/port"
|
||||
)
|
||||
|
||||
const tagObjectType = "tag"
|
||||
const tagObjectTypeID int16 = 2 // second row in 007_seed_data.sql object_types
|
||||
const tagObjectType = "tag"
|
||||
const tagObjectTypeID int16 = 2 // second row in 007_seed_data.sql object_types
|
||||
|
||||
// TagParams holds the fields for creating or patching a tag.
|
||||
type TagParams struct {
|
||||
Name string
|
||||
Notes *string
|
||||
Color *string // nil = no change; pointer to empty string = clear
|
||||
CategoryID *uuid.UUID // nil = no change; Nil UUID = unassign
|
||||
Color *string // nil = no change; pointer to empty string = clear
|
||||
CategoryID *uuid.UUID // nil = no change; Nil UUID = unassign
|
||||
Metadata json.RawMessage
|
||||
IsPublic *bool
|
||||
}
|
||||
@@ -422,4 +422,4 @@ func (s *TagService) expandTagSet(ctx context.Context, seeds []uuid.UUID) ([]uui
|
||||
}
|
||||
|
||||
return queue, nil
|
||||
}
|
||||
}
|
||||
|
||||
@@ -189,4 +189,4 @@ func (s *UserService) Delete(ctx context.Context, id int16) error {
|
||||
}
|
||||
_ = s.audit.Log(ctx, "user_delete", nil, nil, map[string]any{"target_user_id": id})
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user