You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

18 lines
220 B

5 years ago
package coreutils
5 years ago
import (
"fmt"
"os"
)
func PrintToStderr(v interface{}) {
fmt.Fprintf(os.Stderr, "%v: %v\n", os.Args[0], v)
}
5 years ago
func ExitIfError(err error) {
if err != nil {
PrintToStderr(err)
5 years ago
os.Exit(1)
}
}