about summary refs log tree commit diff
path: root/src/main.zig
diff options
context:
space:
mode:
authorRobert Günzler <r@gnzler.io>2025-10-03 19:01:17 +0200
committerRobert Günzler <r@gnzler.io>2025-10-04 18:41:56 +0200
commit17cec3c7f6cb46d8d80c2364eba8296f6dd01ef3 (patch)
treea659d8c6ab37de10f4f2eaa623b3d7cd6b47b288 /src/main.zig
parentd8ad5e027f60cd8ac86b96eaf4d267e149422025 (diff)
downloadsite-17cec3c7f6cb46d8d80c2364eba8296f6dd01ef3.tar.gz
use canonical duck typing for function names
Signed-off-by: Robert Günzler <r@gnzler.io>
Diffstat (limited to 'src/main.zig')
-rw-r--r--src/main.zig18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/main.zig b/src/main.zig
index faa37aa..f64bfad 100644
--- a/src/main.zig
+++ b/src/main.zig
@@ -146,24 +146,24 @@ const Cli = struct {
         var argv = std.process.args();
 
         const more = argv.skip(); // skip arg0
-        if (!more) return &Cli.help_cmd;
+        if (!more) return &Cli.helpCmd;
 
-        const next_arg = argv.next() orelse return &Cli.help_cmd;
+        const next_arg = argv.next() orelse return &Cli.helpCmd;
 
         if (std.mem.eql(u8, next_arg, "gen")) {
-            return &Cli.gen_cmd;
+            return &Cli.genCmd;
         } else if (std.mem.eql(u8, next_arg, "md")) {
-            return &Cli.gen_md_cmd;
+            return &Cli.genMdCmd;
         } else {
-            return &Cli.help_cmd;
+            return &Cli.helpCmd;
         }
     }
 
-    fn help_cmd(_: *Context) void {
+    fn helpCmd(_: *Context) void {
         std.debug.print("usage: rbl [gen|md]\n\n", .{});
     }
 
-    fn gen_cmd(ctx: *Context) void {
+    fn genCmd(ctx: *Context) void {
         index(ctx) catch {
             log.err("Failed to index pages.", .{});
             std.os.linux.exit(1);
@@ -175,13 +175,13 @@ const Cli = struct {
         };
     }
 
-    fn gen_md_cmd(ctx: *Context) void {
+    fn genMdCmd(ctx: *Context) void {
         index(ctx) catch {
             log.err("Failed to index pages.", .{});
             std.os.linux.exit(1);
         };
 
-        exe.run_pandoc(ctx) catch {
+        exe.runPandoc(ctx) catch {
             log.err("Failed to process markdown files.", .{});
             std.os.linux.exit(1);
         };