add initial out command
This commit is contained in:
17
fmt.go
Normal file
17
fmt.go
Normal file
@@ -0,0 +1,17 @@
|
||||
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...)
|
||||
}
|
Reference in New Issue
Block a user