📣 A user-friendly status outputting library for go
Simply run the command below in the root of your go project:
go get -u github.com/gleich/statuser/v2
Here is some basic usage:
Output an error to the user
- message
- Type:
string
- Description: A human readable message to help the user
- Type:
- err
- Type:
err
- Description: The golang error
- Type:
- exitCode
- Type:
int
- Description: Exit code used to exit the program
- Type:
Outputs the following in red text:
░░░░░░░░░░░░░
░🚨 ERROR 🚨░
░░░░░░░░░░░░░
message
GOLANG ERROR (SHOW DEVELOPER):
err
exit status 1
Output an error to the user with just a message
- message
- Type:
string
- Description: A human readable message to help the user
- Type:
- exitCode
- Type:
int
- Description: Exit code used to exit the program
- Type:
Outputs the following in red text:
░░░░░░░░░░░░░
░🚨 ERROR 🚨░
░░░░░░░░░░░░░
message
exit status 1
Output a warning the user
- message
- Type:
string
- Description: The warning message to display to the user
- Type:
Outputs the following text in yellow:
⚠️ WARNING ⚠️
message
Output a warning the user
- message
- Type:
string
- Description: The success message to display to the user
- Type:
Outputs the following text in green:
✅ message
- Matthew Gleich (@gleich)