Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@koral--
Last active October 16, 2018 18:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save koral--/a5af7775a13bedceeda472f1f6b85751 to your computer and use it in GitHub Desktop.
Save koral--/a5af7775a13bedceeda472f1f6b85751 to your computer and use it in GitHub Desktop.
Bitrise step Chuck Norris jokes main function
func main() {
var config Config
if err := stepconf.Parse(&config); err != nil {
log.Errorf("Could not validate config, error: %s\n", err)
os.Exit(1)
}
joke, err := getRandomJoke(config)
if err != nil {
log.Errorf("Could not get joke, error: %s\n", err)
os.Exit(1)
}
log.Successf("%s", joke)
if err := exportEnvironmentWithEnvman(joke); err != nil {
log.Errorf("Could not export joke, error: %s\n", err)
os.Exit(1)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment