蛋蛋星球 后台端
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.

4 viikkoa sitten
12345678910111213141516171819202122232425
  1. package utils
  2. import (
  3. "fmt"
  4. "os"
  5. "strconv"
  6. "time"
  7. )
  8. func Debug(args ...interface{}) {
  9. s := ""
  10. l := len(args)
  11. if l < 1 {
  12. fmt.Println("please input some data")
  13. os.Exit(0)
  14. }
  15. i := 1
  16. for _, v := range args {
  17. s += fmt.Sprintf("【"+strconv.Itoa(i)+"】: %#v\n", v)
  18. i++
  19. }
  20. s = "******************** 【DEBUG - " + time.Now().Format("2006-01-02 15:04:05") + "】 ********************\n" + s + "******************** 【DEBUG - END】 ********************\n"
  21. fmt.Println(s)
  22. os.Exit(0)
  23. }