Last active
October 16, 2018 18:22
-
-
Save koral--/a5af7775a13bedceeda472f1f6b85751 to your computer and use it in GitHub Desktop.
Bitrise step Chuck Norris jokes main function
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
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