From 3ad59121e802c9e812aa0a78baa2ea26bab9b629 Mon Sep 17 00:00:00 2001 From: "deepsource-autofix[bot]" <62050782+deepsource-autofix[bot]@users.noreply.github.com> Date: Tue, 12 Dec 2023 06:28:21 +0000 Subject: [PATCH] style: format code with Gofumpt and Prettier This commit fixes the style issues introduced in d9e1940 according to the output from Gofumpt and Prettier. Details: https://github.com/vdaas/vald/pull/2161 --- internal/observability/metrics/mem/index/index.go | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/internal/observability/metrics/mem/index/index.go b/internal/observability/metrics/mem/index/index.go index 27c79a808f5..aecdf2ee151 100644 --- a/internal/observability/metrics/mem/index/index.go +++ b/internal/observability/metrics/mem/index/index.go @@ -683,7 +683,6 @@ func (*memoryMetrics) Register(m metrics.Meter) error { otherSys.Observe(ctx, int64(mstats.OtherSys)) nextGcSys.Observe(ctx, int64(mstats.NextGC)) - ptMs := int64(0) if mstats.PauseTotalNs > 0 { ptMs = int64(mstats.PauseTotalNs / uint64(time.Millisecond)) @@ -691,9 +690,9 @@ func (*memoryMetrics) Register(m metrics.Meter) error { pauseTotalMs.Observe(ctx, ptMs) numGC.Observe(ctx, int64(mstats.NumGC)) numForcedGC.Observe(ctx, int64(mstats.NumForcedGC)) - - heapWillReturn.Observe(ctx, int64(mstats.HeapIdle - mstats.HeapReleased)) - liveObjects.Observe(ctx, int64(mstats.Mallocs - mstats.Frees)) + + heapWillReturn.Observe(ctx, int64(mstats.HeapIdle-mstats.HeapReleased)) + liveObjects.Observe(ctx, int64(mstats.Mallocs-mstats.Frees)) }, ) }