cmd

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Jul 25, 2021 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Version string
	Date    time.Time
)
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 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

func Execute

func Execute()

Types

This section is empty.

Jump to

Keyboard shortcuts

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