commit ef110a7a373b1ec2672192872152b340829940b0
parent dde53779d585619805be6594f4577de8d38eab3d
Author: n0tr1v <n0tr1v@protonmail.com>
Date: Wed, 14 Dec 2022 22:27:29 -0500
simplify code
Diffstat:
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/pkg/web/handlers/handlers.go b/pkg/web/handlers/handlers.go
@@ -984,9 +984,7 @@ func generateCssFrames(n int64, contentFn func(int64) string, reverse bool) (fra
num = n - i
}
if contentFn == nil {
- contentFn = func(i int64) string {
- return utils.FormatInt64(i)
- }
+ contentFn = utils.FormatInt64
}
frames = append(frames, fmt.Sprintf(`%.2f%% { content: "%s"; }`, pct, contentFn(num)))
pct += step