cmd

package
v0.8.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 19, 2025 License: AGPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ManCmd = &cobra.Command{
	Use:                   "man",
	Short:                 "generate Waku's manpages",
	Long:                  "Generate Waku's manpages.",
	SilenceUsage:          true,
	SilenceErrors:         true,
	DisableFlagsInUseLine: true,
	Hidden:                true,
	Args:                  cobra.NoArgs,
	ValidArgsFunction:     cobra.NoFileCompletions,
	RunE: func(cmd *cobra.Command, args []string) error {
		manPage, err := mango.NewManPage(1, RootCmd)
		if err != nil {
			return errors.ToWakuError(err)
		}

		if _, err := fmt.Fprint(os.Stdout, manPage.Build(roff.NewDocument())); err != nil {
			return errors.ToWakuError(err)
		}

		return nil
	},
}
View Source
var RootCmd = &cobra.Command{
	Use:           "waku",
	Short:         "let's make starting new projects feel like a breeze again",
	SilenceErrors: true,
	SilenceUsage:  true,
	Long: utils.MultilineString(
		"Waku (waku!) 枠組み",
		"",
		"Waku helps you kickstart new projects from templates.",
		"Let's make starting new projects feel like a breeze again.",
	),
	PersistentPreRunE: func(cmd *cobra.Command, args []string) error {
		if options.GlobalOpts.Quiet {
			return log.SetLevel(log.QUIET)
		}

		if options.GlobalOpts.Verbosity > 3 || options.GlobalOpts.Verbosity < 0 {
			return fmt.Errorf("verbosity level must be between 0 and 3")
		}

		return log.SetLevel(log.WARNING - log.Level(options.GlobalOpts.Verbosity))
	},
}

The Root command

Functions

func Execute

func Execute()

The main entry point for the command line tool

Types

This section is empty.

Directories

Path Synopsis
For async cleanup in cases of interrupts
For async cleanup in cases of interrupts

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL