Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ankddev/conemu-progressbar-go
Simple Go library for using ConEmu ProgressBar sequences (`OSC 9;4`)
https://github.com/ankddev/conemu-progressbar-go
conemu go golang golang-library osc progress-bar progressbar
Last synced: about 1 month ago
JSON representation
Simple Go library for using ConEmu ProgressBar sequences (`OSC 9;4`)
- Host: GitHub
- URL: https://github.com/ankddev/conemu-progressbar-go
- Owner: ankddev
- License: mit
- Created: 2024-12-05T15:49:34.000Z (about 1 month ago)
- Default Branch: main
- Last Pushed: 2024-12-13T13:46:57.000Z (about 1 month ago)
- Last Synced: 2024-12-13T14:34:19.336Z (about 1 month ago)
- Topics: conemu, go, golang, golang-library, osc, progress-bar, progressbar
- Language: Go
- Homepage:
- Size: 9.77 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
conemu-progressbar for Go
Simple Go library for using ConEmu ProgressBar sequences (
OSC 9;4
)# Installing
Run this:
```bash
$ go get github.com/ankddev/conemu-progressbar-go
```
Then, import in your code:
```go
import "github.com/ankddev/conemu-progressbar-go"
```
And enjoy!
# [Documentation](https://pkg.go.dev/github.com/ankddev/conemu-progressbar-go#section-documentation)
Functions:
* `ClearProgress` clears progress via sending sequence with 0 state
```go
ClearProgress()
```
* `SetIndeterminateProgress` sets indeterminate progress state
```go
SetIndeterminateProgress()
```
* `SetProgress` sets progress with default state
```go
err := SetProgress(80)
if err != nil {
fmt.Println(err.Error())
}
```
Returns error if `progress` < `0` or > `100`
* `SetErrorProgress` sets progress with error state
```go
err := SetErrorProgress(50)
if err != nil {
fmt.Println(err.Error())
}
```
Returns error if `progress` < `0` or > `100`
* `SetWarningProgress` sets progress with warning state
```go
err := SetWarningProgress(0)
if err != nil {
fmt.Println(err.Error())
}
```
Returns error if `progress` < `0` or > `100`
# Contributing
* Fork repository
* Clone your fork
* Create changes
* Run tests with
```bash
$ go test
```
* Commit and push changes
* Create pull request
# See Also- [codewars-api-rs](https://github.com/ankddev/codewars-api-rs) - Rust library for Codewars API
- [envfetch](https://github.com/ankddev/envfetch) - Lightweight crossplatform CLI tool for working with environment variables
- [terminal-go](https://github.com/ankddev/terminal-go) - Go library for working with ANSI/VT terminal sequences
- [zapret-discord-youtube](https://github.com/ankddev/zapret-discord-youtube) - Zapret build for Windows for fixing Discord and YouTube in Russia or othher services