cmd

package
v1.0.10 Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2025 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CamelCaseCmd = &cobra.Command{
	Use:                   "camel-case [text]",
	Short:                 "Coverts string to camel case (fooBar)",
	Args:                  cobra.ExactArgs(1),
	DisableFlagsInUseLine: true,
	Run: func(cmd *cobra.Command, args []string) {
		fmt.Println(cases.Camel(args[0]))
	},
}
View Source
var KebabCaseCmd = &cobra.Command{
	Use:                   "kebab-case [text]",
	Short:                 "Coverts string to kebab case (foo-bar)",
	Args:                  cobra.ExactArgs(1),
	DisableFlagsInUseLine: true,
	Run: func(cmd *cobra.Command, args []string) {
		fmt.Println(cases.Kebab(args[0]))
	},
}
View Source
var LowerCaseCmd = &cobra.Command{
	Use:                   "lower-case [text]",
	Short:                 "Coverts string to lower case (foo bar)",
	Args:                  cobra.ExactArgs(1),
	DisableFlagsInUseLine: true,
	Run: func(cmd *cobra.Command, args []string) {
		fmt.Println(cases.Lower(args[0]))
	},
}
View Source
var Root = &cobra.Command{
	Use:           "gool",
	Short:         "Gool make your life easier",
	SilenceErrors: true,
	SilenceUsage:  true,
	Run: func(cmd *cobra.Command, args []string) {
		shell := shell.New(os.Stdin, os.Stdout)
		shell.Register(commands()...)
		shell.SetHistoryPath(os.TempDir())
		shell.Run()
	},
}
View Source
var SnakeCaseCmd = &cobra.Command{
	Use:                   "snake-case [text]",
	Short:                 "Coverts string to snake case (foo_bar)",
	Args:                  cobra.ExactArgs(1),
	DisableFlagsInUseLine: true,
	Run: func(cmd *cobra.Command, args []string) {
		fmt.Println(cases.Snake(args[0]))
	},
}
View Source
var StartCaseCmd = &cobra.Command{
	Use:                   "start-case [text]",
	Short:                 "Coverts string to start case (Foo Bar)",
	Args:                  cobra.ExactArgs(1),
	DisableFlagsInUseLine: true,
	Run: func(cmd *cobra.Command, args []string) {
		fmt.Println(cases.Start(args[0]))
	},
}
View Source
var UpperCaseCmd = &cobra.Command{
	Use:                   "upper-case [text]",
	Short:                 "Coverts string to upper case (FOO BAR)",
	Args:                  cobra.ExactArgs(1),
	DisableFlagsInUseLine: true,
	Run: func(cmd *cobra.Command, args []string) {
		fmt.Println(cases.Upper(args[0]))
	},
}

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

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