Skip to content

Commit

Permalink
make consts private
Browse files Browse the repository at this point in the history
  • Loading branch information
valaparthvi committed Jun 14, 2022
1 parent b5e77ba commit c9601e6
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions pkg/binding/asker/survey_asker.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import (
)

const (
BindAsFiles = "Bind As Files"
BindAsEnvVar = "Bind As Environment Variables"
bindAsFiles = "Bind As Files"
bindAsEnvVar = "Bind As Environment Variables"
)

type Survey struct{}
Expand Down Expand Up @@ -47,17 +47,17 @@ func (s *Survey) AskServiceBindingName(defaultName string) (string, error) {
func (o *Survey) AskBindAsFiles() (bool, error) {
question := &survey.Select{
Message: "How do you want to bind the service?",
Options: []string{BindAsFiles, BindAsEnvVar},
Options: []string{bindAsFiles, bindAsEnvVar},
}
var answer string
err := survey.AskOne(question, &answer)
if err != nil {
return true, err
}

var bindAsFiles bool
if answer == BindAsFiles {
bindAsFiles = true
var bindAsFile bool
if answer == bindAsFiles {
bindAsFile = true
}
return bindAsFiles, nil
return bindAsFile, nil
}

0 comments on commit c9601e6

Please sign in to comment.