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.

15 lines
208 B

11 years ago
11 years ago
11 years ago
11 years ago
  1. package common
  2. import (
  3. "fmt"
  4. "os"
  5. )
  6. func Panicf(s string, args ...interface{}) {
  7. panic(fmt.Sprintf(s, args...))
  8. }
  9. func Exitf(s string, args ...interface{}) {
  10. fmt.Printf(s+"\n", args...)
  11. os.Exit(1)
  12. }