mirror of
				https://github.com/beego/bee.git
				synced 2025-11-04 04:13:26 +00:00 
			
		
		
		
	refactor: optimized code
This commit is contained in:
		@@ -153,8 +153,10 @@ func AskForConfirmation() bool {
 | 
				
			|||||||
	if err != nil {
 | 
						if err != nil {
 | 
				
			||||||
		beeLogger.Log.Fatalf("%s", err)
 | 
							beeLogger.Log.Fatalf("%s", err)
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
	okayResponses := []string{"y", "Y", "yes", "Yes", "YES"}
 | 
						response = strings.ToLower(strings.TrimSpace(response))
 | 
				
			||||||
	nokayResponses := []string{"n", "N", "no", "No", "NO"}
 | 
					
 | 
				
			||||||
 | 
						okayResponses := []string{"y", "yes"}
 | 
				
			||||||
 | 
						nokayResponses := []string{"n", "no"}
 | 
				
			||||||
	if containsString(okayResponses, response) {
 | 
						if containsString(okayResponses, response) {
 | 
				
			||||||
		return true
 | 
							return true
 | 
				
			||||||
	} else if containsString(nokayResponses, response) {
 | 
						} else if containsString(nokayResponses, response) {
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user