repositorypackage
0.0.0-20211121125910-b2c5cd7b6dc9
Repository: https://github.com/enr/clui.git
Documentation: pkg.go.dev
# Packages
No description provided by the author
# README
Go Clui
Opinionated, minimalistic and cross platform Go library to manage output of command line apps.
Clui concepts:
- Layout: the output style, eg. plain or machine readable
- VerbosityLevel: how the output is filtered
- Interactivity: if wait for user's answers
Import the library:
import (
"github.com/enr/clui"
)
Creation of a default Clui
:
ui, err := clui.NewClui()
Creation with configuration:
verbosity := func(ui *clui.Clui) {
ui.VerbosityLevel = clui.VerbosityLevelHigh
}
ui, _ := clui.NewClui(verbosity)
See examples
directory for more.
License
A lot of code of this library was taken from Packer UI released under the same license (Mozilla Public License Version 2.0).
Mozilla Public License Version 2.0 - see LICENSE file.
Copyright 2015 clui contributors