feat(rename): Fix typo in name ...
This commit is contained in:
parent
ec6485aa45
commit
f7e9aa7dfb
26
cmd/init.go
26
cmd/init.go
@ -57,31 +57,31 @@ func runInitAction(cmd *cobra.Command, args []string) {
|
||||
|
||||
log.Debugf("Working in directory: %s", currentPath)
|
||||
|
||||
// Check if we are in gouik directory
|
||||
log.Debug("Checking if we are in the same directory as Gouik")
|
||||
// Check if we are in gouick directory
|
||||
log.Debug("Checking if we are in the same directory as Gouick")
|
||||
|
||||
isGouikDir, err := helpers.IsGouikDirectory(currentPath)
|
||||
isGouickDir, err := helpers.IsGouickDirectory(currentPath)
|
||||
if err != nil {
|
||||
log.Errorf("Fail to check if we are in gouik directory. The following error happen: %s", err.Error())
|
||||
log.Errorf("Fail to check if we are in gouick directory. The following error happen: %s", err.Error())
|
||||
return
|
||||
}
|
||||
|
||||
if isGouikDir {
|
||||
log.Error("You cannot initialize a new project in the same dir than gouik\nGouik should be added to your path")
|
||||
if isGouickDir {
|
||||
log.Error("You cannot initialize a new project in the same dir than gouick\nGouick should be added to your path")
|
||||
return
|
||||
}
|
||||
|
||||
// Check if we are in a gouik project
|
||||
log.Debug("Checking if we are in a gouik project")
|
||||
// Check if we are in a gouick project
|
||||
log.Debug("Checking if we are in a gouick project")
|
||||
|
||||
isGouikProject, err := helpers.IsGouikProject(currentPath)
|
||||
isGouickProject, err := helpers.IsGouickProject(currentPath)
|
||||
if err != nil {
|
||||
log.Errorf("Fail to check if we are in a gouik project. The following error happen: %s", err.Error())
|
||||
log.Errorf("Fail to check if we are in a gouick project. The following error happen: %s", err.Error())
|
||||
return
|
||||
}
|
||||
|
||||
if isGouikProject {
|
||||
log.Error("You cannot initialize a new project in an already gouik project")
|
||||
if isGouickProject {
|
||||
log.Error("You cannot initialize a new project in an already gouick project")
|
||||
return
|
||||
}
|
||||
|
||||
@ -100,7 +100,7 @@ func runInitAction(cmd *cobra.Command, args []string) {
|
||||
// Create directory
|
||||
// Move to dir
|
||||
// git init
|
||||
// create .gouik
|
||||
// create .gouick
|
||||
// move templated file
|
||||
|
||||
// if isGoProject, err := helpers.IsGoProject(); err != nil {
|
||||
|
@ -50,7 +50,7 @@ func runUpgradeAction(cmd *cobra.Command, args []string) {
|
||||
log.Infof("Your %s is not supported.", dependency.GetName())
|
||||
|
||||
if !dependency.CanBeInstalled() {
|
||||
log.Warnf("%s cannot be installed by Gouik. Please install it by yourself !", dependency.GetName())
|
||||
log.Warnf("%s cannot be installed by Gouick. Please install it by yourself !", dependency.GetName())
|
||||
continue
|
||||
}
|
||||
|
||||
|
@ -13,7 +13,7 @@ import (
|
||||
// versionCmd represents the version command
|
||||
var versionCmd = &cobra.Command{
|
||||
Use: "version",
|
||||
Short: "Show gouik version",
|
||||
Short: "Show gouick version",
|
||||
Run: runVersion,
|
||||
}
|
||||
|
||||
|
@ -1,3 +1,3 @@
|
||||
package helpers
|
||||
|
||||
const configFile = ".gouik.yaml"
|
||||
const configFile = ".gouick.yaml"
|
||||
|
@ -228,7 +228,7 @@ func (g Golang) PostInstall(path string) error {
|
||||
}
|
||||
|
||||
lineBashRc := []string{
|
||||
"# Golang - Added by gouik",
|
||||
"# Golang - Added by gouick",
|
||||
}
|
||||
|
||||
gopath := os.Getenv("GOPATH")
|
||||
|
@ -204,7 +204,7 @@ You will have to reopen a new terminal to apply the changes or execute the follo
|
||||
func (s Swagger) PostInstall(path string) error {
|
||||
|
||||
lineBashRc := []string{
|
||||
"# Swagger - Added by gouik",
|
||||
"# Swagger - Added by gouick",
|
||||
}
|
||||
|
||||
// checking if swagger binary is found after installation
|
||||
|
@ -11,23 +11,23 @@ import (
|
||||
log "github.com/sirupsen/logrus"
|
||||
)
|
||||
|
||||
func IsGouikDirectory(path string) (bool, error) {
|
||||
func IsGouickDirectory(path string) (bool, error) {
|
||||
|
||||
binPath, err := os.Executable()
|
||||
if err != nil {
|
||||
return false, errors.Trace(err)
|
||||
}
|
||||
|
||||
gouikPath := filepath.Dir(binPath)
|
||||
gouickPath := filepath.Dir(binPath)
|
||||
|
||||
if gouikPath != path {
|
||||
if gouickPath != path {
|
||||
return false, nil
|
||||
}
|
||||
|
||||
return true, nil
|
||||
}
|
||||
|
||||
func IsGouikProject(path string) (bool, error) {
|
||||
func IsGouickProject(path string) (bool, error) {
|
||||
|
||||
exist, err := fileExists(filepath.Join(path, configFile))
|
||||
if err != nil {
|
||||
|
Loading…
Reference in New Issue
Block a user