Skip to content

Instantly share code, notes, and snippets.

@kyriediculous
Created May 10, 2019 12:46
Show Gist options
  • Save kyriediculous/f4b40772fc00aa50a7c97503f7d435a7 to your computer and use it in GitHub Desktop.
Save kyriediculous/f4b40772fc00aa50a7c97503f7d435a7 to your computer and use it in GitHub Desktop.
func init() {
createCmd.Flags().StringP("author", "a", "", "Add an author")
createCmd.Flags().StringP("title", "t", "", "A title for the blog")
createCmd.Flags().StringP("content", "c", "", "The content for the blog")
createCmd.MarkFlagRequired("author")
createCmd.MarkFlagRequired("title")
createCmd.MarkFlagRequired("content")
rootCmd.AddCommand(createCmd)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment