mdtable source pure
Package mdtable provides a simple way to create Markdown tables.
Package mdtable provides a simple way to create Markdown tables.
Example usage:
Example
1import "gno.land/p/moul/mdtable"
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
1
- strings stdlib