Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/gosimple/spinner
Simple text spinner
https://github.com/gosimple/spinner
go text-spinner
Last synced: about 2 months ago
JSON representation
Simple text spinner
- Host: GitHub
- URL: https://github.com/gosimple/spinner
- Owner: gosimple
- License: mpl-2.0
- Created: 2014-03-31T06:29:18.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2021-07-24T21:29:37.000Z (over 3 years ago)
- Last Synced: 2024-06-20T03:33:44.915Z (7 months ago)
- Topics: go, text-spinner
- Language: Go
- Size: 35.2 KB
- Stars: 9
- Watchers: 2
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
spinner
=======[![Go Reference](https://pkg.go.dev/badge/github.com/gosimple/spinner.svg)](https://pkg.go.dev/github.com/gosimple/spinner)
[![Tests](https://github.com/gosimple/spinner/actions/workflows/tests.yml/badge.svg)](https://github.com/gosimple/spinner/actions/workflows/tests.yml)Package `spinner` implements text spinner. Useful for generating semirandom text.
## Features
+ Supported brackets: curly `{}` and square `[]`
+ Supported text separators: `|` and `~`
+ Unlimited nesting## Example
text := "{Hello|Big} {world|people}!"
fmt.Println(spinner.Spin(text))
// Possible outputs:
// Hello world!
// Big world!
// Hello people!
// Big people!### Requests or bugs?
## Installation
go get -u github.com/gosimple/spinner
## License
The source files are distributed under the
[Mozilla Public License, version 2.0](http://mozilla.org/MPL/2.0/),
unless otherwise noted.
Please read the [FAQ](http://www.mozilla.org/MPL/2.0/FAQ.html)
if you have further questions regarding the license.