Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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.

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 main

import "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