feat(input): Full refacto of the user input system
This commit is contained in:
@ -6,6 +6,7 @@ import (
|
||||
"github.com/juju/errors"
|
||||
|
||||
"git.home.m-and-m.ovh/mderasse/gouick/helpers"
|
||||
"git.home.m-and-m.ovh/mderasse/gouick/helpers/input"
|
||||
"git.home.m-and-m.ovh/mderasse/gouick/models"
|
||||
|
||||
log "github.com/sirupsen/logrus"
|
||||
@ -31,13 +32,13 @@ func (a APIType) GetInitializeUserInput(params *models.Config) (*models.Config,
|
||||
|
||||
if !isInGoPath {
|
||||
log.Debug("We are not in GoPath, ask extra info")
|
||||
goModulePath := helpers.StringInput()
|
||||
goModulePath := input.String(true)
|
||||
log.Info("Go Module path:")
|
||||
params.ModulePath = &goModulePath
|
||||
}
|
||||
|
||||
log.Info("Do you want to enable database models auto generation ?")
|
||||
params.Features.DatabaseModels.Enabled = helpers.YesOrNoInput()
|
||||
params.Features.DatabaseModels.Enabled = input.YesOrNo()
|
||||
|
||||
return params, nil
|
||||
}
|
||||
|
Reference in New Issue
Block a user