mirror of
https://github.com/danielmiessler/fabric
synced 2024-11-10 07:10:31 +00:00
28 lines
443 B
Go
28 lines
443 B
Go
package utils
|
|
|
|
import (
|
|
"fmt"
|
|
"os"
|
|
|
|
"gopkg.in/gookit/color.v1"
|
|
)
|
|
|
|
func Print(info string) {
|
|
fmt.Println(info)
|
|
}
|
|
|
|
func PrintWarning (s string) {
|
|
fmt.Println(color.Yellow.Render("Warning: " + s))
|
|
}
|
|
|
|
func LogError(err error) {
|
|
fmt.Fprintln(os.Stderr, color.Red.Render(err.Error()))
|
|
}
|
|
|
|
func LogWarning(err error) {
|
|
fmt.Fprintln(os.Stderr, color.Yellow.Render(err.Error()))
|
|
}
|
|
|
|
func Log(info string) {
|
|
fmt.Println(color.Green.Render(info))
|
|
} |