AlecAivazis / survey

A golang library for building interactive and accessible prompts with full support for windows and posix terminals.
MIT License
4.07k stars 350 forks source link

How to set Flags #402

Closed fcarvalhido closed 2 years ago

fcarvalhido commented 2 years ago

How can we set flags, I got this error

var seedQuestions = []*survey.Question{
{
    Name: "models",
    Prompt: &survey.Select{
        Message: "Selected models you want to seed:",
        Options: []string{"customer", "location", "division", "price"},
        Help:    "Select the models you want to seed",
    },
    Validate: survey.Required,
},
}
2022/01/24 14:09:21 flag provided but not defined: -models
mislav commented 2 years ago

Hi, this error doesn't seem to be produced by this library (Survey), but by something else in your codebase. Try to inspect your flag parsing code.