diff options
| author | Furkan Sahin <furkan-dev@proton.me> | 2021-09-03 21:45:03 -0500 |
|---|---|---|
| committer | Furkan Sahin <furkan-dev@proton.me> | 2021-09-03 21:45:03 -0500 |
| commit | ec52e2bee871afed1d362ac99d9418722b54e499 (patch) | |
| tree | 4bbed9db8246642dc463afc857ac36b30e6152ed /cmd/planr/sub | |
| parent | a70cfc735be53ac01cd6065c13fc9884bd96ae03 (diff) | |
Forgo scoring zero point assignment
Diffstat (limited to 'cmd/planr/sub')
| -rw-r--r-- | cmd/planr/sub/cli.go | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/cmd/planr/sub/cli.go b/cmd/planr/sub/cli.go index 0832b7b..64318c2 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, + )); + } } |
