fix(global): Multiple small fixes and upgrade of go + goswagger
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Matthieu 'JP' DERASSE
2022-11-21 17:22:17 +00:00
parent b1f168286f
commit 5f4e7e5be6
22 changed files with 155 additions and 567 deletions

View File

@ -1,6 +1,5 @@
/*
Copyright © 2022 Matthieu Derasse <git@derasse.fr>
*/
package cmd

View File

@ -1,6 +1,5 @@
/*
Copyright © 2022 Matthieu Derasse <git@derasse.fr>
*/
package cmd

View File

@ -1,6 +1,5 @@
/*
Copyright © 2022 Matthieu Derasse <git@derasse.fr>
*/
package cmd

View File

@ -1,6 +1,5 @@
/*
Copyright © 2022 Matthieu Derasse <git@derasse.fr>
*/
package cmd

View File

@ -1,6 +1,5 @@
/*
Copyright © 2022 Matthieu Derasse <git@derasse.fr>
*/
package cmd

View File

@ -1,6 +1,5 @@
/*
Copyright © 2022 Matthieu Derasse <git@derasse.fr>
*/
package cmd

View File

@ -1,6 +1,5 @@
/*
Copyright © 2022 Matthieu Derasse <git@derasse.fr>
*/
package cmd

View File

@ -1,6 +1,5 @@
/*
Copyright © 2022 Matthieu Derasse <git@derasse.fr>
*/
package cmd

View File

@ -1,6 +1,5 @@
/*
Copyright © 2022 Matthieu Derasse <git@derasse.fr>
*/
package cmd

View File

@ -1,6 +1,5 @@
/*
Copyright © 2022 Matthieu Derasse <git@derasse.fr>
*/
package cmd
@ -118,7 +117,7 @@ func runInitAction(cmd *cobra.Command, args []string) {
// ask project directory
log.Info("Name of the project directory:")
projectDirectory := input.Alphanumerical(true)
projectDirectory := strings.ToLower(input.Alphanumerical(true))
// ask project name
log.Info("Name of the project:")
@ -177,7 +176,7 @@ func runInitAction(cmd *cobra.Command, args []string) {
}
// Execute git init.
log.Info("Initializing Git")
log.Info("Initializing Git with main branch")
gitinit := exec.Command("git", "init")
_, err = gitinit.Output()
@ -186,6 +185,13 @@ func runInitAction(cmd *cobra.Command, args []string) {
return
}
gitcheckout := exec.Command("git", "checkout", "-b", "main")
_, err = gitcheckout.Output()
if err != nil {
log.Errorf("Fail to git checkout -b main. The following error happen: %s", err.Error())
return
}
log.Info("Creating gouick configuration file")
err = helpers.WriteConfig(projectDirPath, config)
if err != nil {

View File

@ -1,6 +1,5 @@
/*
Copyright © 2022 Matthieu Derasse <git@derasse.fr>
*/
package cmd

View File

@ -1,6 +1,5 @@
/*
Copyright © 2022 Matthieu Derasse <git@derasse.fr>
*/
package cmd

View File

@ -1,6 +1,5 @@
/*
Copyright © 2022 Matthieu Derasse <git@derasse.fr>
*/
package cmd

View File

@ -1,6 +1,5 @@
/*
Copyright © 2022 Matthieu Derasse <git@derasse.fr>
*/
package cmd