aboutsummaryrefslogtreecommitdiff
path: root/src/format.nim
diff options
context:
space:
mode:
Diffstat (limited to 'src/format.nim')
-rw-r--r--src/format.nim6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/format.nim b/src/format.nim
index c3a7e5e..bb5ae1f 100644
--- a/src/format.nim
+++ b/src/format.nim
@@ -65,6 +65,12 @@ proc printError*(color: bool, s: string) =
proc printWarning*(color: bool, s: string) =
stderr.writeLine(^Color.yellow, trp"warning: ", ^Color.normal, s)
+proc printFile*(color: bool, quiet: bool, name: string, file: string) =
+ if quiet:
+ echo(file)
+ else:
+ echo(^Color.bold, name, ^Color.normal, ' ', file)
+
proc formatPkgRating*(votes: int, popularity: float): string =
$votes & " / " & formatFloat(popularity, format = ffDecimal, precision = 6)