Skip to documentation
SLOP

tiny.smg.cli.table

Reference tiny.smg cli table

Defined in cli.

API (5)

Actions

Public operations.

Types and contracts

Public types and contracts.

Namespaces

Public namespaces.

No direct callersNo direct callsclitable
Static calls · unresolved targets: unknown · external targets: unknown.

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");}
Called byCallsNo direct callerscli.tablewriteJsonOptioncli.tablewrite
Static calls · unresolved targets: 0 · external targets: 0.

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);        }    }}
Called byCallscli.tablewriteprivate; no linklib.pretty.core.src.compacttableprivate; no linktools.smg.src.cli.table.compactwriteFootercli.tablewriteJsonOption
Static calls · unresolved targets: 0 · external targets: 2.

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

Definitions5
Public names5
Members0
Version26.7.0
Revisiondaab053ee433