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:
2026-06-11 11:01:29 +03:00
parent f5f7db6c2a
commit 0e7890a465
70 changed files with 2753 additions and 1047 deletions
+1 -1
View File
@@ -143,4 +143,4 @@ func (h *ACLHandler) SetPermissions(c *gin.Context) {
out[i] = toPermissionJSON(p)
}
respondJSON(c, http.StatusOK, out)
}
}
+1 -1
View File
@@ -117,4 +117,4 @@ func (h *AuditHandler) List(c *gin.Context) {
"offset": page.Offset,
"limit": page.Limit,
})
}
}
+1 -1
View File
@@ -232,4 +232,4 @@ func (h *CategoryHandler) ListTags(c *gin.Context) {
"offset": page.Offset,
"limit": page.Limit,
})
}
}
+9 -9
View File
@@ -89,16 +89,16 @@ type fileJSON struct {
func toTagJSON(t domain.Tag) tagJSON {
j := tagJSON{
ID: t.ID.String(),
Name: t.Name,
Notes: t.Notes,
Color: t.Color,
ID: t.ID.String(),
Name: t.Name,
Notes: t.Notes,
Color: t.Color,
CategoryName: t.CategoryName,
CategoryColor: t.CategoryColor,
CreatorID: t.CreatorID,
CreatorName: t.CreatorName,
IsPublic: t.IsPublic,
CreatedAt: t.CreatedAt.Format(time.RFC3339),
CreatorID: t.CreatorID,
CreatorName: t.CreatorName,
IsPublic: t.IsPublic,
CreatedAt: t.CreatedAt.Format(time.RFC3339),
}
if t.CategoryID != nil {
s := t.CategoryID.String()
@@ -672,4 +672,4 @@ func parseUUIDs(strs []string) ([]uuid.UUID, error) {
ids = append(ids, id)
}
return ids, nil
}
}
+1 -1
View File
@@ -353,4 +353,4 @@ func (h *PoolHandler) Reorder(c *gin.Context) {
return
}
c.Status(http.StatusNoContent)
}
}
+6 -6
View File
@@ -106,11 +106,11 @@ func (h *TagHandler) List(c *gin.Context) {
func (h *TagHandler) Create(c *gin.Context) {
var body struct {
Name string `json:"name" binding:"required"`
Notes *string `json:"notes"`
Color *string `json:"color"`
CategoryID *string `json:"category_id"`
IsPublic *bool `json:"is_public"`
Name string `json:"name" binding:"required"`
Notes *string `json:"notes"`
Color *string `json:"color"`
CategoryID *string `json:"category_id"`
IsPublic *bool `json:"is_public"`
}
if err := c.ShouldBindJSON(&body); err != nil {
respondError(c, domain.ErrValidation)
@@ -549,4 +549,4 @@ func (h *TagHandler) FileRemoveTag(c *gin.Context) {
// Helpers
// ---------------------------------------------------------------------------
func ptr(s string) *string { return &s }
func ptr(s string) *string { return &s }
+1 -1
View File
@@ -255,4 +255,4 @@ func (h *UserHandler) Delete(c *gin.Context) {
return
}
c.Status(http.StatusNoContent)
}
}