mirror of https://github.com/danielmiessler/fabric
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
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))
|
|
} |