var stage *models.Stage if pAllNode { stage = currentStage } else { stage = currentStage.Filter(pFqdns, pTags) } if pAllRepositories { stage.CheckAll() } else { stage.Check(pRepositories) } if stage.HasError() { RenderErrorSummary(stage) } }, } func init() { pulpCmd.AddCommand(checkCmd) // Here you will define your flags and configuration settings. // Cobra supports Persistent Flags which will work for this command // and all subcommands, e.g.: //checkCmd.PersistentFlags().String("foo", "", "A help for foo") // Cobra supports local flags which will only run when this command