Created
July 31, 2017 21:47
-
-
Save petergtz/68eb8cec02f0eb68a93f794a84d7f456 to your computer and use it in GitHub Desktop.
Some Go code with new error handling
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
virtualGuestService := softlayerClient.GetSoftLayer_Virtual_Guest_Service() or_on_error e { | |
fail_with cli.NewExitError(e.Error(), 1) | |
} | |
server := cliContext.GlobalString("server") | |
port := cliContext.GlobalInt("port") | |
if server == "" { | |
fail_with cli.NewExitError("server not provided as input flag", 1) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment