Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/heapwolf/go-tabulate
Column-like layout (padded to fit) for arrays of strings.
https://github.com/heapwolf/go-tabulate
Last synced: 25 days 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 (over 9 years ago)
- Default Branch: master
- Last Pushed: 2015-05-03T15:43:48.000Z (over 9 years ago)
- Last Synced: 2024-10-18T17:09:09.781Z (26 days ago)
- Language: Go
- Size: 141 KB
- Stars: 7
- Watchers: 3
- 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
![img](/cols.png)[0]:https://github.com/hij1nx/go-termsize