chore: apply gofumpt formatting

Pre-existing formatting drift picked up by `make fmt`. Whitespace and
comment layout only, no semantic change.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-08-27 10:28:22 +02:00
co-authored by Claude Opus 5
parent 4cfbecd818
commit fca7b81e3d
3 changed files with 4 additions and 5 deletions
-1
View File
@@ -80,7 +80,6 @@ func (api *RestAPI) getUsers(rw http.ResponseWriter, r *http.Request) {
// @security ApiKeyAuth // @security ApiKeyAuth
// @router /api/user/{id} [post] // @router /api/user/{id} [post]
func (api *RestAPI) updateUserByRequest(rw http.ResponseWriter, r *http.Request) { func (api *RestAPI) updateUserByRequest(rw http.ResponseWriter, r *http.Request) {
if user := repository.GetUserFromContext(r.Context()); !user.HasRole(schema.RoleAdmin) { if user := repository.GetUserFromContext(r.Context()); !user.HasRole(schema.RoleAdmin) {
handleError(fmt.Errorf("only admins are allowed to update a user"), http.StatusForbidden, rw) handleError(fmt.Errorf("only admins are allowed to update a user"), http.StatusForbidden, rw)
return return
+2 -2
View File
@@ -382,8 +382,8 @@ func (l *Level) findLevel(selector []string) *Level {
// - selector: Pattern to match (consumed recursively) // - selector: Pattern to match (consumed recursively)
// - offset: Metric index in metrics slice (from MetricConfig.offset) // - offset: Metric index in metrics slice (from MetricConfig.offset)
// - f: Callback invoked on each matching buffer; path holds the matched // - f: Callback invoked on each matching buffer; path holds the matched
// level keys (e.g. ["cluster","node001","cpu0"]) so callers can // level keys (e.g. ["cluster","node001","cpu0"]) so callers can
// identify which node/component the buffer belongs to // identify which node/component the buffer belongs to
// - path: Accumulated level keys from the root; pass nil at the top level // - path: Accumulated level keys from the root; pass nil at the top level
// //
// Returns: // Returns:
+2 -2
View File
@@ -104,8 +104,8 @@ func TestFreeViaProviderPrunesDeadNodes(t *testing.T) {
const freq int64 = 60 const freq int64 = 60
thr := time.Unix(100000, 0) thr := time.Unix(100000, 0)
writeNode(ms, "fritz", "dead", nil, freq, 1000, 2000) // stale, not used -> pruned writeNode(ms, "fritz", "dead", nil, freq, 1000, 2000) // stale, not used -> pruned
writeNode(ms, "fritz", "busy", nil, freq, 1000, 2000) // stale, but used -> kept writeNode(ms, "fritz", "busy", nil, freq, 1000, 2000) // stale, but used -> kept
writeNode(ms, "fritz", "live", nil, freq, 100000, 100600) // fresh -> kept writeNode(ms, "fritz", "live", nil, freq, 100000, 100600) // fresh -> kept
ms.SetNodeProvider(&fakeNodeProvider{nodes: map[string][]string{"fritz": {"busy"}}}) ms.SetNodeProvider(&fakeNodeProvider{nodes: map[string][]string{"fritz": {"busy"}}})