spinner

package module
v1.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 24, 2021 License: MPL-2.0 Imports: 3 Imported by: 0

README

spinner

Go Reference Tests

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?

https://github.com/gosimple/spinner/issues

Installation

go get -u github.com/gosimple/spinner

License

The source files are distributed under the Mozilla Public License, version 2.0, unless otherwise noted.
Please read the FAQ if you have further questions regarding the license.

Documentation

Overview

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?

https://github.com/gosimple/spinner/issues

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Spin

func Spin(text string) (spinned string)

Spin returns a spinned text.

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL