tamias.go 238 B

123456789101112131415161718192021222324252627282930
  1. package tamias
  2. import "os"
  3. import "fmt"
  4. func Fatal(error string) {
  5. fmt.Fprintln(os.Stderr, "Assertion failed: ", error);
  6. os.Exit(1)
  7. }
  8. func Assert(cond bool, err string) {
  9. if cond {
  10. return
  11. }
  12. Fatal(err)
  13. }