From ff3a51f3544a255b2b2bcd489e7ef71a12e7196a Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Thu, 18 Jan 2024 00:57:43 -0600 Subject: gofmt autofix paths Signed-off-by: Jeff Carr --- timer.go | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'timer.go') diff --git a/timer.go b/timer.go index 0ba5faf..380e4bb 100644 --- a/timer.go +++ b/timer.go @@ -6,12 +6,14 @@ import ( // timeFunction takes a function as an argument and returns the execution time. func timeFunction(f func()) time.Duration { - startTime := time.Now() // Record the start time - f() // Execute the function + startTime := time.Now() // Record the start time + f() // Execute the function return time.Since(startTime) // Calculate the elapsed time } func (ls *RepoStatus) SetSpeedActual(s string) { - if ! ls.Ready() {return} + if !ls.Ready() { + return + } ls.speedActual.SetText(s) } -- cgit v1.2.3