We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 977e866 commit 25f3975Copy full SHA for 25f3975
src/util/funcs.zig
@@ -3,6 +3,7 @@ const string = []const u8;
3
const gpa = std.heap.c_allocator;
4
const extras = @import("extras");
5
const git = @import("git");
6
+const ansi = @import("ansi");
7
8
//
9
@@ -12,12 +13,9 @@ pub const kb = b * 1024;
12
13
pub const mb = kb * 1024;
14
pub const gb = mb * 1024;
15
-const ansi_red = "\x1B[31m";
16
-const ansi_reset = "\x1B[39m";
17
-
18
pub fn assert(ok: bool, comptime fmt: string, args: anytype) void {
19
if (!ok) {
20
- std.debug.print(ansi_red ++ fmt ++ ansi_reset ++ "\n", args);
+ std.debug.print(ansi.color.Fg(.Red, fmt) ++ "\n", args);
21
std.process.exit(1);
22
}
23
0 commit comments