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.

17 lines
220 B

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