Skip to content

Instantly share code, notes, and snippets.

@petergtz
Created July 31, 2017 20:41
Show Gist options
  • Save petergtz/d62a8b40b6799b8e10f12df6d7a7da96 to your computer and use it in GitHub Desktop.
Save petergtz/d62a8b40b6799b8e10f12df6d7a7da96 to your computer and use it in GitHub Desktop.
Some Go code with a semantic error in the error handling
virtualGuestService, e := softlayerClient.GetSoftLayer_Virtual_Guest_Service()
if e != nil {
return cli.NewExitError(e.Error(), 1)
}
server := cliContext.GlobalString("server")
port := cliContext.GlobalInt("port")
if server == "" {
return cli.NewExitError(e.Error(), 1)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment