Advertisement
cwchen

[Go] Print out error messages.

Oct 28th, 2017
515
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Go 0.17 KB | None | 0 0
  1. package main
  2.  
  3. import (
  4.     "errors"
  5.     "fmt"
  6. )
  7.  
  8. func main() {
  9.     err := errors.New("Some error")
  10.     if err != nil {
  11.         fmt.Println(err)
  12.     }
  13.  
  14.     fmt.Println("More message")
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement