| 1 | const std = @import("std"); |
| 2 | const gpa = std.heap.c_allocator; |
| 3 | const nfs = @import("nfs"); |
| 4 | |
| 5 | const zpm = @import("./../zpm.zig"); |
| 6 | |
| 7 | // |
| 8 | // |
| 9 | |
| 10 | pub fn execute(self_name: []const u8, args: []const [:0]const u8) !void { |
| 11 | _ = self_name; |
| 12 | |
| 13 | const out = nfs.stdout(); |
| 14 | |
| 15 | const url = try std.mem.join(gpa, "/", &.{ zpm.server_root, args[0] }); |
| 16 | const doc = try zpm.server_fetch(url); |
| 17 | doc.acquire(); |
| 18 | defer doc.release(); |
| 19 | |
| 20 | try out.print("{}\n", .{doc}); |
| 21 | } |