-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #12 from BenjuhminStewart/style-change-use-cmd-to-new
style: change `use` command to `new`
- Loading branch information
Showing
6 changed files
with
24 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
/* | ||
Copyright © 2024 Benjamin Stewart <[email protected] | ||
*/ | ||
package use | ||
package new | ||
|
||
import ( | ||
"fmt" | ||
|
@@ -11,11 +11,11 @@ import ( | |
"github.com/spf13/viper" | ||
) | ||
|
||
// UseCmd represents the init command | ||
var UseCmd = &cobra.Command{ | ||
Use: "use <name_of_stew>", | ||
Short: "Use a stew instance to create a new project", | ||
Long: `stew use <name_of_stew> [flags]`, | ||
// NewCmd represents the init command | ||
var NewCmd = &cobra.Command{ | ||
Use: "new <name_of_stew>", | ||
Short: "Create a new instance of a stew template to create a new project", | ||
Long: `stew new <name_of_stew> [flags]`, | ||
Run: func(cmd *cobra.Command, args []string) { | ||
s := types.Stews{} | ||
err := s.Load(viper.GetString("stewsPath")) | ||
|
@@ -59,7 +59,7 @@ var UseCmd = &cobra.Command{ | |
} | ||
|
||
func flags() { | ||
UseCmd.Flags().StringP("path", "p", "", "The path to the stew (defaults to current directory)") | ||
NewCmd.Flags().StringP("path", "p", "", "The path to the stew (defaults to current directory)") | ||
} | ||
|
||
func init() { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters