update prompt selections to const

This commit is contained in:
Maidul Islam
2023-04-20 14:08:35 -07:00
parent 5a906d412b
commit f79e1d754d
2 changed files with 2 additions and 3 deletions
+2 -2
View File
@@ -284,7 +284,7 @@ func init() {
} }
func DomainOverridePrompt() (bool, error) { func DomainOverridePrompt() (bool, error) {
var ( const (
PRESET = "Use Domain" PRESET = "Use Domain"
OVERRIDE = "Change Domain" OVERRIDE = "Change Domain"
) )
@@ -306,7 +306,7 @@ func DomainOverridePrompt() (bool, error) {
func askForDomain() error { func askForDomain() error {
//query user to choose between Infisical cloud or self hosting //query user to choose between Infisical cloud or self hosting
var ( const (
INFISICAL_CLOUD = "Infisical Cloud" INFISICAL_CLOUD = "Infisical Cloud"
SELF_HOSTING = "Self Hosting" SELF_HOSTING = "Self Hosting"
) )
-1
View File
@@ -39,7 +39,6 @@ func WriteInitalConfig(userCredentials *models.UserCredentials) error {
} }
//if empty or if email not in loggedinUsers //if empty or if email not in loggedinUsers
if len(existingConfigFile.LoggedInUsers) == 0 || !ConfigContainsEmail(existingConfigFile.LoggedInUsers, userCredentials.Email) { if len(existingConfigFile.LoggedInUsers) == 0 || !ConfigContainsEmail(existingConfigFile.LoggedInUsers, userCredentials.Email) {
existingConfigFile.LoggedInUsers = append(existingConfigFile.LoggedInUsers, loggedInUser) existingConfigFile.LoggedInUsers = append(existingConfigFile.LoggedInUsers, loggedInUser)
} else { } else {
//if exists update domain of loggedin users //if exists update domain of loggedin users