v0 source pure
Package mdtable provides a simple way to create Markdown tables.
View source
gno.land/p/moul/mdtable/v0
Build Markdown tables.
Part of moul/gno-contracts — moul's versioned gno.land contracts. See the repository for the full catalog, build/test tooling, and usage.
⚠️ Disclaimer: provided as-is, without warranty; not security-audited. Full disclaimer: DISCLAIMER.
Package mdtable provides a simple way to create Markdown tables.
Example usage:
Example
1import "gno.land/p/moul/mdtable/v0"
2
3func Render(path string) string {
4 table := mdtable.Table{
5 Headers: []string{"ID", "Title", "Status", "Date"},
6 }
7 table.Append([]string{"#1", "Add a new validator", "succeed", "2024-01-01"})
8 table.Append([]string{"#2", "Change parameter", "timed out", "2024-01-02"})
9 return table.String()
10}
Output:
1
Imports 1
/p/g1magld5ptgzaktqcexxq0pgq5lmdf0kz6re8hlv/mdtable/v0