MCPcopy Create free account
hub / github.com/danielmiessler/Fabric / AddSetupQuestionCustomBool

Method AddSetupQuestionCustomBool

internal/plugins/plugin.go:95–104  ·  view source on GitHub ↗
(name string, required bool, question string)

Source from the content-addressed store, hash-verified

93}
94
95func (o *PluginBase) AddSetupQuestionCustomBool(name string, required bool, question string) (ret *SetupQuestion) {
96 setting := o.AddSetting(name, required)
97 setting.Type = SettingTypeBool
98 ret = &SetupQuestion{Setting: setting, Question: question}
99 if ret.Question == "" {
100 ret.Question = fmt.Sprintf(i18n.T("plugin_enable_bool_question"), o.Name, strings.ToUpper(name))
101 }
102 o.SetupQuestions = append(o.SetupQuestions, ret)
103 return
104}
105
106func (o *PluginBase) Configure() (err error) {
107 if err = o.Settings.Configure(); err != nil {

Callers 1

AddSetupQuestionBoolMethod · 0.95

Calls 2

AddSettingMethod · 0.95
TFunction · 0.92

Tested by

no test coverage detected