Skip to content

enr/clui

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Opinionated, minimalistic and cross platform UI library for Go command line apps

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published