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
185 B

  1. package main
  2. import (
  3. "log"
  4. "runtime"
  5. )
  6. func check(err error) {
  7. if err != nil {
  8. _, fn, line, _ := runtime.Caller(1)
  9. log.Println(line)
  10. log.Println(fn)
  11. log.Println(err)
  12. }
  13. }