tiny.smg.cli.table
Defined in cli.
API (5)
Actions
Public operations.
Types and contracts
Public types and contracts.
Namespaces
Public namespaces.
Source
Source: tools/smg/src/cli/table/compact.zig:36
zig
pub fn appendRow( allocator: std.mem.Allocator, rows: *std.ArrayList([]const []const u8), cells: []const []const u8,) !void { try rows.append(allocator, try allocator.dupe([]const u8, cells));}Source: tools/smg/src/cli/table/compact.zig:8
zig
pub fn write( allocator: std.mem.Allocator, writer: *std.Io.Writer, columns: []const Column, rows: []const []const []const u8, total: ?usize,) !void { try writeJsonOption(allocator, writer, columns, rows, total, "--json");}Source: tools/smg/src/cli/table/compact.zig:18
zig
pub fn writeJsonOption( allocator: std.mem.Allocator, writer: *std.Io.Writer, columns: []const Column, rows: []const []const []const u8, total: ?usize, json_option: []const u8,) !void { const rendered = try compact.table(allocator, columns, rows, null); defer allocator.free(rendered); try writer.writeAll(rendered); if (total) |count| { if (count > rows.len) { try writeFooter(allocator, writer, rows.len, count, json_option); } }}Source: tools/smg/src/cli/table/compact.zig:6
zig
pub const Column = compact.Column;Source: tools/smg/src/cli/root.zig:10
zig
pub const table = @import("table/root.zig");Source: tools/smg/src/cli/table/root.zig
zig
const compact_module = @import("compact.zig");pub const rich = @import("rich.zig");pub const Column = compact_module.Column;pub const write = compact_module.write;pub const writeJsonOption = compact_module.writeJsonOption;pub const appendRow = compact_module.appendRow;Audit
| Definitions | 5 |
|---|---|
| Public names | 5 |
| Members | 0 |
| Version | 26.7.0 |
| Revision | daab053ee433 |