ooni-probe-cli/internal/util/util.go
2018-02-07 20:02:18 +02:00

20 lines
354 B
Go

package util
import (
"fmt"
"os"
"github.com/openobservatory/gooni/internal/colors"
)
// Log outputs a log message.
func Log(msg string, v ...interface{}) {
fmt.Printf(" %s\n", colors.Purple(fmt.Sprintf(msg, v...)))
}
// Fatal error
func Fatal(err error) {
fmt.Fprintf(os.Stderr, "\n %s %s\n\n", colors.Red("Error:"), err)
os.Exit(1)
}