https://github.com/haquenafeem/rio
Rio is a colorful logging library
https://github.com/haquenafeem/rio
color golang logging
Last synced: about 1 month ago
JSON representation
Rio is a colorful logging library
- Host: GitHub
- URL: https://github.com/haquenafeem/rio
- Owner: haquenafeem
- License: mit
- Created: 2021-02-15T16:46:54.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2021-03-25T21:22:47.000Z (over 5 years ago)
- Last Synced: 2025-01-20T19:16:46.309Z (over 1 year ago)
- Topics: color, golang, logging
- Language: Go
- Homepage: https://github.com/haquenafeem/rio
- Size: 58.6 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Rio
Rio, is a beautiful console logging package named after my pet bird.
You can use this package to colorfully log texts, or any data types in the console.
Using color to print things, will make your developing experience easier and clearer.
# Install or go get
```
go get github.com/haquenafeem/rio
```
# Example
### Code (cmd/main.go) :
```golang
package main
import (
"fmt"
"github.com/haquenafeem/rio"
)
func main() {
fmt.Println("Rio is beautiful.....Check her swag")
fmt.Printf("%v %v %v %v %v %v %v %v",
rio.Ignore("Ignore"),
rio.Error("Error"),
rio.Success("Success"),
rio.Warn("Warn"),
rio.Log("Log"),
rio.Info("Info"),
rio.Question("Question"),
rio.Quote(`"Quote"`))
fmt.Println()
fmt.Println()
fmt.Println("I'm sad because they", rio.Ignore("ignored"), "me.")
fmt.Println("This could be an", rio.Error("error."))
fmt.Println("We", rio.Success("successfully"), "did it.")
fmt.Println("This", rio.Warn("warning"), "should not be avoided.")
fmt.Println("Let me", rio.Log("log"), "it to the console.")
fmt.Println("Here is an information:", rio.Info("Rio is my pet parrot."))
fmt.Println("Hey!", rio.Question("How you doin?."))
fmt.Println(rio.Quote(`"Love the life you live, live the life you love"`), "- Bob Marley.")
fmt.Println()
}
```
### Output (console/terminal) :
