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

Method AddSetupQuestionWithEnvName

internal/plugins/plugin.go:84–89  ·  view source on GitHub ↗

AddSetupQuestionWithEnvName creates a setup question with an explicit environment variable name. This is useful when you want the environment variable name to remain constant across languages. The envVarName is used for the environment variable, while the question is localized.

(envVarName string, required bool, question string)

Source from the content-addressed store, hash-verified

82// This is useful when you want the environment variable name to remain constant across languages.
83// The envVarName is used for the environment variable, while the question is localized.
84func (o *PluginBase) AddSetupQuestionWithEnvName(envVarName string, required bool, question string) (ret *SetupQuestion) {
85 setting := o.AddSetting(envVarName, required)
86 ret = &SetupQuestion{Setting: setting, Question: question}
87 o.SetupQuestions = append(o.SetupQuestions, ret)
88 return
89}
90
91func (o *PluginBase) AddSetupQuestionBool(name string, required bool) (ret *SetupQuestion) {
92 return o.AddSetupQuestionCustomBool(name, required, "")

Callers 8

NewPatternsLoaderFunction · 0.80
NeeDefaultsFunction · 0.80
NewLanguageFunction · 0.80
NewCustomPatternsFunction · 0.80
NewSpotifyFunction · 0.80
NewStrategiesManagerFunction · 0.80
NewClientFunction · 0.80
NewClientFunction · 0.80

Calls 1

AddSettingMethod · 0.95

Tested by

no test coverage detected