Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jesusprubio/leg
🔈 Nicer CLIs foz lazy devs
https://github.com/jesusprubio/leg
cli elegant golang logger nice print
Last synced: 2 months ago
JSON representation
🔈 Nicer CLIs foz lazy devs
- Host: GitHub
- URL: https://github.com/jesusprubio/leg
- Owner: jesusprubio
- License: mit
- Archived: true
- Created: 2019-05-25T18:20:43.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2024-03-18T20:35:20.000Z (10 months ago)
- Last Synced: 2024-10-07T23:47:47.181Z (3 months ago)
- Topics: cli, elegant, golang, logger, nice, print
- Language: Go
- Homepage:
- Size: 22.5 KB
- Stars: 200
- Watchers: 5
- Forks: 7
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE.txt
Awesome Lists containing this project
- awesome-rust - jesusprubio/leg
- awesome-rust-cn - jesusprubio/leg
README
# leg
**Archived**, now just using [slog](https://go.dev/blog/slog).
***
[![GoDoc][doc-img]][doc] [![Build Status][ci-img]][ci]
Tiny wrapper to beauty command line application prototypes with a minimal effort.
- Prints to `stderr`.
- Thanks to [color](https://github.com/fatih/color) library:
- Cross platform.
- Respects [NO_COLOR](https://no-color.org).## Install
```sg
go get -u github.com/jesusprubio/leg
```### Dependencies
- [Go](https://go.dev/doc/install) stable version.
## Use
Visit the [tests](leg_test.go) to check more details.
```golang
leg.Head("mumu", "🐘", "0.1.0")
leg.Info("Informational message", "")
leg.Success("Successful operation", "")
leg.Warn("Warn message", "")
leg.Error("Error message", "")
leg.Wait("Waiting for something", "")
leg.Done("Something finished", "")leg.Info("Informational message with scope", "scope-0")
fmt.Print("deleted line")
leg.Remove()leg.Result("To standard output")
```[doc-img]: https://pkg.go.dev/badge/github.com/jesusprubio/leg
[doc]: https://pkg.go.dev/github.com/jesusprubio/leg
[ci-img]: https://github.com/jesusprubio/leg/workflows/CI/badge.svg
[ci]: https://github.com/jesusprubio/leg/workflows/go.yml