18 lines
286 B
Go
18 lines
286 B
Go
package resource
|
|
|
|
import (
|
|
"fmt"
|
|
"os"
|
|
|
|
"github.com/mitchellh/colorstring"
|
|
)
|
|
|
|
func Fatal(doing string, err error) {
|
|
Sayf(colorstring.Color("[red]error %s: %s\n"), doing, err)
|
|
os.Exit(1)
|
|
}
|
|
|
|
func Sayf(message string, args ...interface{}) {
|
|
fmt.Fprintf(os.Stderr, message, args...)
|
|
}
|