Skip to content

Commit 39d6364

Browse files
committed
feat: app name
1 parent 116d81d commit 39d6364

File tree

3 files changed

+0
-14
lines changed

3 files changed

+0
-14
lines changed

cmd/template/prompt.go

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ import (
99
)
1010

1111
func promptForValues() {
12-
promptForAppName()
1312
promptForTemplate()
1413
promptForDBConfig()
1514
}
@@ -24,16 +23,6 @@ func promptForTemplate() {
2423
}
2524
}
2625

27-
func promptForAppName() {
28-
if appName == "" {
29-
prompt := &survey.Input{
30-
Message: fmt.Sprintf("Enter your app name [%s]: ", color.New(color.Faint).Sprint(defaultAppName)),
31-
Default: defaultAppName,
32-
}
33-
survey.AskOne(prompt, &appName)
34-
}
35-
}
36-
3726
func promptForDBConfig() {
3827
if dbUsername == "" {
3928
prompt := &survey.Input{

cmd/template/template.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ var (
2222
dbPort string
2323
skipPrompts bool
2424
templateChoice string
25-
defaultAppName = "my-gin-app"
2625
defaultDBUsername = "root"
2726
defaultDBType = "MySQL"
2827
defaultDBPassword = "password"
@@ -68,7 +67,6 @@ func CustomTemplateHelpFunc(cmd *cobra.Command, args []string) {
6867
Default string
6968
}{
7069
{"template", "t", "Template to use (Standard)", defaultTemplateChoice},
71-
{"app-name", "a", "Name of your application", defaultAppName},
7270
{"db-host", "H", "Database host", defaultDBHost},
7371
{"db-name", "n", "Database name", defaultDBName},
7472
{"db-username", "u", "Database username", defaultDBUsername},

utils/file_writer.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
// ./utils/file_writer.go
21
package utils
32

43
import (

0 commit comments

Comments
 (0)