https://github.com/heapwolf/go-tabulate
Column-like layout (padded to fit) for arrays of strings.
https://github.com/heapwolf/go-tabulate
Last synced: about 1 month ago
JSON representation
Column-like layout (padded to fit) for arrays of strings.
- Host: GitHub
- URL: https://github.com/heapwolf/go-tabulate
- Owner: heapwolf
- License: mit
- Created: 2015-05-03T15:39:04.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2015-05-03T15:43:48.000Z (about 10 years ago)
- Last Synced: 2025-03-29T19:03:49.828Z (about 2 months ago)
- Language: Go
- Size: 141 KB
- Stars: 7
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# SYNOPSIS
Column-like layout (padded to fit) for arrays of strings.Each string from a `[]string` is padded to fit a given width
and a string will be returned. Useful with [`termsize`][0].# EXAMPLE
```go
package mainimport "fmt"
import "github.com/hij1nx/go-tabulate"var w = 80 // usually the calculated terminal width
var a = []string{"foo", "barrrrrr", "bazz", "blaaaaa"}fmt.Println(Tabulate(w, a))
```# SCREENSHOT
[0]:https://github.com/hij1nx/go-termsize