Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/gleich/statuser
📣 A user-friendly status outputting library for go
https://github.com/gleich/statuser
Last synced: 2 months ago
JSON representation
📣 A user-friendly status outputting library for go
- Host: GitHub
- URL: https://github.com/gleich/statuser
- Owner: gleich
- License: mit
- Created: 2020-06-15T21:58:01.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2023-02-25T06:20:19.000Z (almost 2 years ago)
- Last Synced: 2024-10-28T09:53:32.705Z (3 months ago)
- Language: Go
- Homepage:
- Size: 68.4 KB
- Stars: 5
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE.md
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
- awesome-hackclub - statuser - [@gleich](https://github.com/gleich) - **(Go)** _📣 A user-friendly status outputting library for go_ (Developer Utilities)
README
# statuser ![GitHub release (latest by date including pre-releases)](https://img.shields.io/github/v/release/gleich/statuser?include_prereleases)
📣 A user-friendly status outputting library for go
![build](https://github.com/gleich/statuser/workflows/build/badge.svg)
![lint](https://github.com/gleich/statuser/workflows/lint/badge.svg)
![test](https://github.com/gleich/statuser/workflows/test/badge.svg)## 🚀 Installing
Simply run the command below in the root of your go project:
```bash
go get -u github.com/gleich/statuser/v2
```## 📚 Documentation [![GoDoc](https://godoc.org/github.com/gleich/statuser/v2?status.svg)](https://pkg.go.dev/github.com/gleich/statuser/v2)
Here is some basic usage:
### `Error()`
Output an error to the user
#### Parameters
1. message
- Type: `string`
- Description: A human readable message to help the user
2. err
- Type: `err`
- Description: The golang error
3. exitCode
- Type: `int`
- Description: Exit code used to exit the program#### Example
Outputs the following in red text:
```
░░░░░░░░░░░░░
░🚨 ERROR 🚨░
░░░░░░░░░░░░░message
GOLANG ERROR (SHOW DEVELOPER):
err
exit status 1
```### `ErrorMsg()`
Output an error to the user with just a message
#### Parameters
1. message
- Type: `string`
- Description: A human readable message to help the user
2. exitCode
- Type: `int`
- Description: Exit code used to exit the program#### Example
Outputs the following in red text:
```
░░░░░░░░░░░░░
░🚨 ERROR 🚨░
░░░░░░░░░░░░░message
exit status 1
```### `Warning()`
Output a warning the user
#### Parameters
1. message
- Type: `string`
- Description: The warning message to display to the user#### Example
Outputs the following text in yellow:
```
⚠️ WARNING ⚠️
message
```### `Success()`
Output a warning the user
#### Parameters
1. message
- Type: `string`
- Description: The success message to display to the user#### Example
Outputs the following text in green:
```
✅ message
```## Contributors
1. Matthew Gleich ([@gleich](http://www.github.com/gleich))
## 👥 Contributors
- **[@gleich](https://github.com/gleich)**
- **[@dependabot-preview[bot]](https://github.com/apps/dependabot-preview)**