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

Method FillEnvFileContent

internal/plugins/plugin.go:198–210  ·  view source on GitHub ↗
(buffer *bytes.Buffer)

Source from the content-addressed store, hash-verified

196}
197
198func (o *Setting) FillEnvFileContent(buffer *bytes.Buffer) {
199 if o.IsDefined() {
200 buffer.WriteString(o.EnvVariable)
201 buffer.WriteString("=")
202 if o.Type == SettingTypeBool {
203 v, _ := ParseBool(o.Value)
204 buffer.WriteString(fmt.Sprintf("%v", v))
205 } else {
206 buffer.WriteString(o.Value)
207 }
208 buffer.WriteString("\n")
209 }
210}
211
212func ParseBoolElseFalse(val string) (ret bool) {
213 ret, _ = ParseBool(val)

Callers 4

SaveEnvFileMethod · 0.45
FillEnvFileContentMethod · 0.45

Calls 2

IsDefinedMethod · 0.95
ParseBoolFunction · 0.85

Tested by 1