Skip to content

Commit e6edbca

Browse files
committed
fix
1 parent a6f5714 commit e6edbca

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
Makefile
22
.idea/
33
main/
4-
.gitignore
4+
.gitignore

main.go

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ func NewRepository(datas ...any) error {
5757
err := os.Mkdir(repositoryPath, 0755)
5858
if err != nil {
5959
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`")
6161
var answer string
6262
fmt.Scanln(&answer)
6363
if answer == "q" || answer == "Q" {
@@ -72,7 +72,7 @@ func NewRepository(datas ...any) error {
7272
err := os.Mkdir(repositoryPath+"/"+postgresPath, 0755)
7373
if err != nil {
7474
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`")
7676
var answer string
7777
fmt.Scanln(&answer)
7878
if answer == "q" || answer == "Q" {
@@ -125,7 +125,7 @@ func NewMigration(datas ...any) error {
125125
err := os.Mkdir(migrationPath, 0755)
126126
if err != nil {
127127
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`")
129129
var answer string
130130
fmt.Scanln(&answer)
131131
if answer == "q" || answer == "Q" {
@@ -140,7 +140,7 @@ func NewMigration(datas ...any) error {
140140
err := os.Mkdir(migrationPath+"/"+postgresPath, 0755)
141141
if err != nil {
142142
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`")
144144
var answer string
145145
fmt.Scanln(&answer)
146146
if answer == "q" || answer == "Q" {
@@ -180,7 +180,7 @@ func NewTest(datas ...any) error {
180180
err := os.Mkdir(testPath, 0755)
181181
if err != nil {
182182
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`")
184184
var answer string
185185
fmt.Scanln(&answer)
186186
if answer == "q" || answer == "Q" {
@@ -195,7 +195,7 @@ func NewTest(datas ...any) error {
195195
err := os.Mkdir(testPath+"/"+postgresPath, 0755)
196196
if err != nil {
197197
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`")
199199
var answer string
200200
fmt.Scanln(&answer)
201201
if answer == "q" || answer == "Q" {
@@ -268,7 +268,7 @@ func NewModels(datas ...any) error {
268268
fmt.Println("models folder already exist, If you want to create new migration, click something else `y` or `Y`")
269269
var answer string
270270
fmt.Scanln(&answer)
271-
if answer != "y" || answer != "Y" {
271+
if strings.ToLower(answer) != "y" {
272272
return nil
273273
}
274274
err := os.RemoveAll(migrationPath)
@@ -280,7 +280,7 @@ func NewModels(datas ...any) error {
280280
err := os.Mkdir(migrationPath+"/"+postgresPath, 0755)
281281
if err != nil {
282282
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`")
284284
var answer string
285285
fmt.Scanln(&answer)
286286
if answer == "q" || answer == "Q" {

0 commit comments

Comments
 (0)