authorgravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2025-05-28 02:18:38 -07:00
committergravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2025-05-28 02:18:38 -07:00
log25f39752b3c11fd447eeedbd674db158d5932e72
tree18ee4642ae86546f9892cc42d4744be2b35b65f6
parent977e866a33dd4829eec3c5862eb23ff954ba31ab

funcs: no need to hardcode this when we depend on ansi


1 files changed, 2 insertions(+), 4 deletions(-)

src/util/funcs.zig+2-4
......@@ -3,6 +3,7 @@ const string = []const u8;
33const gpa = std.heap.c_allocator;
44const extras = @import("extras");
55const git = @import("git");
6const ansi = @import("ansi");
67
78//
89//
......@@ -12,12 +13,9 @@ pub const kb = b * 1024;
1213pub const mb = kb * 1024;
1314pub const gb = mb * 1024;
1415
15const ansi_red = "\x1B[31m";
16const ansi_reset = "\x1B[39m";
17
1816pub fn assert(ok: bool, comptime fmt: string, args: anytype) void {
1917 if (!ok) {
20 std.debug.print(ansi_red ++ fmt ++ ansi_reset ++ "\n", args);
18 std.debug.print(ansi.color.Fg(.Red, fmt) ++ "\n", args);
2119 std.process.exit(1);
2220 }
2321}