Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/skeptycal/miniansi
small and efficient ANSI color API for Go CLI programs
https://github.com/skeptycal/miniansi
Last synced: 3 days ago
JSON representation
small and efficient ANSI color API for Go CLI programs
- Host: GitHub
- URL: https://github.com/skeptycal/miniansi
- Owner: skeptycal
- Created: 2022-04-17T18:01:09.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2022-04-17T18:01:22.000Z (over 2 years ago)
- Last Synced: 2024-06-21T09:54:31.620Z (5 months ago)
- Language: Go
- Size: 14.6 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: contributing.md
- Funding: .github/FUNDING.yml
- Code of conduct: CODE_OF_CONDUCT.md
- Security: SECURITY.md
Awesome Lists containing this project
README
# miniansi
> Tricky and fun utilities for Go programs.
---
![GitHub Workflow Status](https://img.shields.io/github/workflow/status/skeptycal/miniansi/Go) ![Codecov](https://img.shields.io/codecov/c/github/skeptycal/miniansi)
[![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-v1.4%20adopted-ff69b4.svg)](code-of-conduct.md)
![Twitter Follow](https://img.shields.io/twitter/follow/skeptycal.svg?label=%40skeptycal&style=social) ![GitHub followers](https://img.shields.io/github/followers/skeptycal.svg?style=social)
---
## Getting Started
### Prerequisites
- [Go](Go) - I recommend the latest stable release. At least 1.18 is required for generic features.
- [Git](Git) - I recommend the latest stable release.
- [GitHub CLI](cli) - you can use git on the command line if you wish, but the github cli is very nice ...Developed with Go 1.16.4. Updated to Go 1.18. Go is _extremely_ backwards compatible and semver stable. Nearly any v1.x should work fine.
---
### Installation
To download the repo and use it as a dependency in your module:
```bash
$ go get github.com/skeptycal/miniansi
```To build and install this package as a utility (if it has a main package) on your machine so you can use it from the command line:
```bash
$ gh repo clone skeptycal/miniansi
$ cd miniansi
# test results and coverage info
$ ./go.test.sh# build the application with race detection enabled.
$ go build -race# install as a utility package
$ go install
```### Use Template
To use this repo as a template for your own project:
```sh
$ gh repo create -y --public --template "https://github.com/skeptycal/miniansi"
```### Contributing
To clone this repo to test and contribute, use `git clone` or `gh repo clone`.
```sh
$ gh repo clone skeptycal/miniansi$ cd miniansi
# or choose a name or issue you wish
$ git branch -b dev```
Use the [Issues][issues] and [PR][pr] templates on the GitHub repo page to contribute.
---
### Basic Usage
> This is a copy of the example script available in the `cmd/example/miniansi` folder:
```go
package mainimport "github.com/skeptycal/miniansi"
func main() {
miniansi.Example()
}```
To try it out:
```sh
# change to the sample folder
$ cd cmd/example/miniansi# run the main.go program
$ go run ./main.go```
---
## Code of Conduct and Contributing
Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us. Please read the [Code of Conduct](CODE_OF_CONDUCT.md) for details before submitting anything.
---
## Versioning
We use SemVer for versioning. For the versions available, see the tags on this repository.
---
## Contributors and Inspiration
- Michael Treanor ([GitHub][github] / [Twitter][twitter]) - Initial work, updates, maintainer
- [Francesc Campoy][campoy] - Inspiration and great YouTube videos!See also the list of contributors who participated in this project.
---
## License
Licensed under the MIT - see the [LICENSE](LICENSE) file for details.
[go]: (https://golang.org/)
[git]: (https://git-scm.com/)
[cli]: (https://cli.github.com/)
[twitter]: (https://www.twitter.com/skeptycal)
[github]: (https://github.com/skeptycal)
[campoy]: (https://github.com/campoy)
[fatih]: (https://github.com/fatih/color)
[issues]: (https://github.com/skeptycal/miniansi/issues)
[pr]: (https://github.com/skeptycal/miniansi/pulls)