{"repo":"chelnak/ysmrr","free":true,"listed":false,"github":"https://github.com/chelnak/ysmrr","clone":"git clone https://github.com/chelnak/ysmrr.git","description":"YSMRR is a package that provides simple multi-line compatible spinners for Go applications.","language":"Go","stars":92,"topics":["spinner","terminal","golang","multi-line-spinner","go","cli","progress-bar","statusbar","terminal-ui","hacktoberfest"],"license":"MIT","category":"cli-tools","readme_excerpt":"You spin me right round You Spin Me Right Round ( ysmrr ) is a package that provides simple multi-line compatible spinners for Go applications. Installing Usage SpinnerManager A SpinnerManager is a collection of spinners that share a common configuration. They can be created as follows: The NewSpinnerManager method also accepts multiple options. For example, you can change the animation and the color of the spinner: A SpinnerManager is also responsible for starting and stopping a group of spinners. Starting a spinner group Stopping a spinner group Running Stop() on a stopped spinner group is a noop operation. Checking if a spinner group is running Spinners SpinnerManagers are great but pretty useless on their own. You need to add at least one spinner. Adding a new spinner is as simple as using the AddSpinner method on a SpinnerManager instance. It expects a string that will be displayed as the initial message of a spinner. AddSpinner will return a spinner instance that you can use to control the spinner. Updating the message Thoughout the lifecycle of a spinner, you can update the message of the spinner. Spinner state A spinner can be set to either Complete or Error to indicate the current state of a task. Example To tie everything together, here is an example that shows how to build a basic spinner app. For more usage examples, check out the examples directory. Inspiration Ysmrr was inspired by the following projects: - github.com/briandowns/spinner - github.com/theckman/yac","default_branch":null,"files":null,"tree":[],"storefront":"/r/chelnak","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/chelnak/ysmrr/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}