@@ -57,7 +57,7 @@ func NewRepository(datas ...any) error {
57
57
err := os .Mkdir (repositoryPath , 0755 )
58
58
if err != nil {
59
59
if strings .Contains (err .Error (), "exists" ) {
60
- fmt .Println ("repository folder already exist, If you want to create new repository, click something else `q ` or `Q `" )
60
+ fmt .Println ("repository folder already exist, If you want to create new repository, click something else `y ` or `Y `" )
61
61
var answer string
62
62
fmt .Scanln (& answer )
63
63
if answer == "q" || answer == "Q" {
@@ -72,7 +72,7 @@ func NewRepository(datas ...any) error {
72
72
err := os .Mkdir (repositoryPath + "/" + postgresPath , 0755 )
73
73
if err != nil {
74
74
if strings .Contains (err .Error (), "exists" ) {
75
- fmt .Println ("repository/postgres folder already exist, If you want to create new repository/postgres, click something else `q ` or `Q `" )
75
+ fmt .Println ("repository/postgres folder already exist, If you want to create new repository/postgres, click something else `y ` or `Y `" )
76
76
var answer string
77
77
fmt .Scanln (& answer )
78
78
if answer == "q" || answer == "Q" {
@@ -125,7 +125,7 @@ func NewMigration(datas ...any) error {
125
125
err := os .Mkdir (migrationPath , 0755 )
126
126
if err != nil {
127
127
if strings .Contains (err .Error (), "exists" ) {
128
- fmt .Println ("migration folder already exist, If you want to create new migration, click something else `q ` or `Q `" )
128
+ fmt .Println ("migration folder already exist, If you want to create new migration, click something else `y ` or `Y `" )
129
129
var answer string
130
130
fmt .Scanln (& answer )
131
131
if answer == "q" || answer == "Q" {
@@ -140,7 +140,7 @@ func NewMigration(datas ...any) error {
140
140
err := os .Mkdir (migrationPath + "/" + postgresPath , 0755 )
141
141
if err != nil {
142
142
if strings .Contains (err .Error (), "exists" ) {
143
- fmt .Println ("migration/postgres folder already exist, If you want to create new migration/postgres, click something else `q ` or `Q `" )
143
+ fmt .Println ("migration/postgres folder already exist, If you want to create new migration/postgres, click something else `y ` or `Y `" )
144
144
var answer string
145
145
fmt .Scanln (& answer )
146
146
if answer == "q" || answer == "Q" {
@@ -180,7 +180,7 @@ func NewTest(datas ...any) error {
180
180
err := os .Mkdir (testPath , 0755 )
181
181
if err != nil {
182
182
if strings .Contains (err .Error (), "exists" ) {
183
- fmt .Println ("test folder already exist, If you want to create new test, click something else `q ` or `Q `" )
183
+ fmt .Println ("test folder already exist, If you want to create new test, click something else `y ` or `Y `" )
184
184
var answer string
185
185
fmt .Scanln (& answer )
186
186
if answer == "q" || answer == "Q" {
@@ -195,7 +195,7 @@ func NewTest(datas ...any) error {
195
195
err := os .Mkdir (testPath + "/" + postgresPath , 0755 )
196
196
if err != nil {
197
197
if strings .Contains (err .Error (), "exists" ) {
198
- fmt .Println ("test/postgres folder already exist, If you want to create new test/postgres, click something else `q ` or `Q `" )
198
+ fmt .Println ("test/postgres folder already exist, If you want to create new test/postgres, click something else `y ` or `Y `" )
199
199
var answer string
200
200
fmt .Scanln (& answer )
201
201
if answer == "q" || answer == "Q" {
@@ -268,7 +268,7 @@ func NewModels(datas ...any) error {
268
268
fmt .Println ("models folder already exist, If you want to create new migration, click something else `y` or `Y`" )
269
269
var answer string
270
270
fmt .Scanln (& answer )
271
- if answer != "y" || answer != "Y " {
271
+ if strings . ToLower ( answer ) != "y" {
272
272
return nil
273
273
}
274
274
err := os .RemoveAll (migrationPath )
@@ -280,7 +280,7 @@ func NewModels(datas ...any) error {
280
280
err := os .Mkdir (migrationPath + "/" + postgresPath , 0755 )
281
281
if err != nil {
282
282
if strings .Contains (err .Error (), "exists" ) {
283
- fmt .Println ("migration/postgres folder already exist, If you want to create new migration/postgres, click something else `q ` or `Q `" )
283
+ fmt .Println ("migration/postgres folder already exist, If you want to create new migration/postgres, click something else `y ` or `Y `" )
284
284
var answer string
285
285
fmt .Scanln (& answer )
286
286
if answer == "q" || answer == "Q" {
0 commit comments