Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var RootCmd = &cobra.Command{ Use: "markdown2confluence", Short: "Push markdown files to Confluence Cloud", Run: func(rootCmd *cobra.Command, args []string) { if m.RunAllFiles != "" { errs := m.RunAllConfigs() errorsFound := false for path, err := range errs { if err != nil { fmt.Printf(util.ColorError("ERROR: ")+"config %s failed, cause: %s \n", path, err) errorsFound = true } } if errorsFound { os.Exit(1) } else { return } } err := m.LoadConfig() if err != nil { log.Fatalf("loading config: %s", err) } if len(args) > 0 { m.SourceMarkdown = args } m.SourceEnvironmentVariables() err = m.Validate() if err != nil { log.Fatal(err) } if m.DryRun { m.PrintMe() return } errors := m.Run() for _, err := range errors { fmt.Println() fmt.Println(err) } if len(errors) > 0 { os.Exit(1) } }, }
RootCmd represents the base command when called without any subcommands
Functions ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.