From 047496b29ef7d76187c8499ddf004d16831c1b69 Mon Sep 17 00:00:00 2001 From: Mike Bell Date: Wed, 9 Oct 2024 10:14:31 +0100 Subject: [PATCH] refactor: shorten count statements --- cmd/mean-time-to-repair/main.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/mean-time-to-repair/main.go b/cmd/mean-time-to-repair/main.go index 5db94167..b7b2f12d 100644 --- a/cmd/mean-time-to-repair/main.go +++ b/cmd/mean-time-to-repair/main.go @@ -95,7 +95,7 @@ func main() { t := strings.Replace(regmatch, "**Time to repair**: ", "", -1) timeToRepairTemp := convertToRaw(t) timeToRepair = timeToRepair + timeToRepairTemp - count = count + 1 + count += 1 } re2 := regexp.MustCompile(`\*\*Time to resolve\*\*: (\d*. \d*.|\d*.)`) @@ -105,7 +105,7 @@ func main() { t := strings.Replace(resolveMatch, "**Time to resolve**: ", "", -1) timeToResolveTemp := convertToRaw(t) timeToResolve = timeToResolve + timeToResolveTemp - resolveCount = resolveCount + 1 + resolveCount += 1 } if count != 0 {