Skip to content

Commit

Permalink
fix: Minor typing issues
Browse files Browse the repository at this point in the history
Fixes minor typing issues and shows the help menu by default when
calling the CLI without any commands or flags.

Signed-off-by: Dominik Gedon <[email protected]>
  • Loading branch information
nodeg committed Oct 21, 2021
1 parent 4a1a37e commit edbee18
Show file tree
Hide file tree
Showing 14 changed files with 16 additions and 14 deletions.
2 changes: 1 addition & 1 deletion cmd/file.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
// fileCmd represents the file command
var fileCmd = &cobra.Command{
Use: "file",
Short: "file management",
Short: "File management",
Long: `Let you manage files.
See https://cobbler.readthedocs.io/en/latest/cobbler.html#cobbler-file for more information.`,
Run: func(cmd *cobra.Command, args []string) {
Expand Down
2 changes: 1 addition & 1 deletion cmd/image.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
// imageCmd represents the image command
var imageCmd = &cobra.Command{
Use: "image",
Short: "image management",
Short: "Image management",
Long: `Let you manage images.
See https://cobbler.readthedocs.io/en/latest/cobbler.html#cobbler-image for more information.`,
Run: func(cmd *cobra.Command, args []string) {
Expand Down
2 changes: 1 addition & 1 deletion cmd/list.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
// listCmd represents the list command
var listCmd = &cobra.Command{
Use: "list",
Short: "List configurations",
Short: "List configuration",
Long: `Lists all configuration which Cobbler can obtain from the saved data. There are also report subcommands for
most of the other Cobbler commands (currently: distro, profile, system, repo, image, mgmtclass, package, file, menu).
Identical to 'cobbler report'`,
Expand Down
2 changes: 1 addition & 1 deletion cmd/menu.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
// menuCmd represents the menu command
var menuCmd = &cobra.Command{
Use: "menu",
Short: "menu management",
Short: "Menu management",
Long: `Let you manage menus.
See https://cobbler.readthedocs.io/en/latest/cobbler.html#cobbler-menu for more information.`,
Run: func(cmd *cobra.Command, args []string) {
Expand Down
2 changes: 1 addition & 1 deletion cmd/mgmtclass.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
// mgmtclassCmd represents the mgmtclass command
var mgmtclassCmd = &cobra.Command{
Use: "mgmtclass",
Short: "mgmtclass management",
Short: "Mgmtclass management",
Long: `Let you manage mgmtclasses.
See https://cobbler.readthedocs.io/en/latest/cobbler.html#cobbler-mgmtclass for more information.`,
Run: func(cmd *cobra.Command, args []string) {
Expand Down
2 changes: 1 addition & 1 deletion cmd/mkloaders.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
// mkloadersCmd represents the mkloaders command
var mkloadersCmd = &cobra.Command{
Use: "mkloaders",
Short: "Generate GRUB bootloaders",
Short: "Generate GRUB 2 bootloaders",
Long: `Generate UEFI bootable GRUB 2 bootloaders. If available on the operating system Cobbler is running on,
then this also generates bootloaders for different architectures then the one of the system.
The options are configured in the Cobbler settings file.`,
Expand Down
2 changes: 1 addition & 1 deletion cmd/package.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
// packageCmd represents the package command
var packageCmd = &cobra.Command{
Use: "package",
Short: "package management",
Short: "Package management",
Long: `Let you manage packages.
See https://cobbler.readthedocs.io/en/latest/cobbler.html#cobbler-package for more information.`,
Run: func(cmd *cobra.Command, args []string) {
Expand Down
2 changes: 1 addition & 1 deletion cmd/profile.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
// profileCmd represents the profile command
var profileCmd = &cobra.Command{
Use: "profile",
Short: "profile management",
Short: "Profile management",
Long: `Let you manage profiles.
See https://cobbler.readthedocs.io/en/latest/cobbler.html#cobbler-profile for more information.`,
Run: func(cmd *cobra.Command, args []string) {
Expand Down
2 changes: 1 addition & 1 deletion cmd/report.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
// reportCmd represents the report command
var reportCmd = &cobra.Command{
Use: "report",
Short: "List configurations",
Short: "List configuration in detail",
Long: `Lists all configuration which Cobbler can obtain from the saved data. There are also report subcommands for
most of the other Cobbler commands (currently: distro, profile, system, repo, image, mgmtclass, package, file, menu).
Identical to 'cobbler list'`,
Expand Down
4 changes: 3 additions & 1 deletion cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@ var rootCmd = &cobra.Command{
Use: "cobbler",
Short: "Cobbler CLI client",
Long: "An independent CLI to manage a Cobbler server.",
Run: func(cmd *cobra.Command, args []string) {},
Run: func(cmd *cobra.Command, args []string) {
cmd.Help()
},
}

// Execute adds all child commands to the root command and sets flags appropriately.
Expand Down
2 changes: 1 addition & 1 deletion cmd/setting.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
// settingCmd represents the setting command
var settingCmd = &cobra.Command{
Use: "setting",
Short: "settings management",
Short: "Settings management",
Long: `Let you manage settings.`,
Run: func(cmd *cobra.Command, args []string) {
// TODO: call cobblerclient
Expand Down
2 changes: 1 addition & 1 deletion cmd/signature.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
// signatureCmd represents the signature command
var signatureCmd = &cobra.Command{
Use: "signature",
Short: "Signature handling",
Short: "Signature management",
Long: `Reloads, reports or updates the signatures of the distinct operating system versions.`,
Run: func(cmd *cobra.Command, args []string) {
// TODO: call cobblerclient
Expand Down
2 changes: 1 addition & 1 deletion cmd/system.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
// systemCmd represents the system command
var systemCmd = &cobra.Command{
Use: "system",
Short: "system management",
Short: "System management",
Long: `Let you manage systems.
See https://cobbler.readthedocs.io/en/latest/cobbler.html#cobbler-system for more information.`,
Run: func(cmd *cobra.Command, args []string) {
Expand Down
2 changes: 1 addition & 1 deletion cmd/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
// versionCmd represents the version command
var versionCmd = &cobra.Command{
Use: "version",
Short: "Show the Cobbler version",
Short: "Print the Cobbler version",
Long: `Shows the Cobbler server version.`,
Run: func(cmd *cobra.Command, args []string) {
// TODO: call cobblerclient
Expand Down

0 comments on commit edbee18

Please sign in to comment.