summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlu0r1ne <flur01ne@flu0r1ne.net>2021-09-03 21:45:03 -0500
committerFlu0r1ne <flur01ne@flu0r1ne.net>2021-09-04 13:24:09 -0500
commit8c803d453201c8b85172d984fc1aee9eb5af2173 (patch)
tree01502d65f8c959dd92add6982aaaa0fb5f01284a
parent2d197f1ce3eac8cecb5a655fcb5343cbe562ab1a (diff)
downloaddeb-planr-8c803d453201c8b85172d984fc1aee9eb5af2173.tar.xz
deb-planr-8c803d453201c8b85172d984fc1aee9eb5af2173.zip
Forgo scoring zero point assignment
-rw-r--r--cmd/planr/sub/cli.go8
1 files changed, 5 insertions, 3 deletions
diff --git a/cmd/planr/sub/cli.go b/cmd/planr/sub/cli.go
index 0e6a942..d667b88 100644
--- a/cmd/planr/sub/cli.go
+++ b/cmd/planr/sub/cli.go
@@ -116,7 +116,9 @@ func printResults(passed, tc_total int, earned, points_total float64) {
percent := earned / points_total * 100
- pprintLabeled("score", fmt.Sprintf(
- "%.2f/%.2f ~= %.1f%%", earned, points_total, percent,
- ));
+ if points_total != 0 {
+ pprintLabeled("score", fmt.Sprintf(
+ "%.2f/%.2f ~= %.1f%%", earned, points_total, percent,
+ ));
+ }
}