Skip to content

Commit

Permalink
Improve coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
jackton1 committed Aug 10, 2023
1 parent eb849b4 commit db20505
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,16 +59,18 @@ func RootCmdRunE(cmd *cobra.Command, args []string) error {
}

reusable, err := cmd.Flags().GetBool("reusable")
// coverage:ignore
// @codeCoverageIgnoreStart
if err != nil {
return err
}
// @codeCoverageIgnoreEnd

markdownLinks, err := cmd.Flags().GetBool("markdownLinks")
// coverage:ignore
// @codeCoverageIgnoreStart
if err != nil {
return err
}
// @codeCoverageIgnoreEnd

var documentation types.Documentation

Expand Down Expand Up @@ -101,10 +103,11 @@ func RootCmdRunE(cmd *cobra.Command, args []string) error {
}

err = documentation.RenderOutput()
// coverage:ignore
// @codeCoverageIgnoreStart
if err != nil {
return err
}
// @codeCoverageIgnoreEnd

_, err = fmt.Fprintln(
cmd.OutOrStdout(),
Expand All @@ -116,10 +119,11 @@ func RootCmdRunE(cmd *cobra.Command, args []string) error {

// Execute adds all child commands to the root command and sets flags appropriately.
// This is called by main.main(). It only needs to happen once to the rootCmd.
// coverage:ignore
// @codeCoverageIgnoreStart
func Execute() {
cobra.CheckErr(rootCmd.Execute())
}
// @codeCoverageIgnoreEnd

// RootCmdFlags adds the flags to the root command.
func RootCmdFlags(cmd *cobra.Command) {
Expand Down

0 comments on commit db20505

Please sign in to comment.