MCPcopy Create free account
hub / github.com/jetify-com/devbox / EnvrcContent

Function EnvrcContent

internal/devbox/generate/devcontainer_util.go:255–269  ·  view source on GitHub ↗
(w io.Writer, envFlags devopt.EnvFlags, configDir string)

Source from the content-addressed store, hash-verified

253}
254
255func EnvrcContent(w io.Writer, envFlags devopt.EnvFlags, configDir string) error {
256 t := template.Must(template.ParseFS(tmplFS, "tmpl/envrcContent.tmpl"))
257 envFlag := ""
258 if len(envFlags.EnvMap) > 0 {
259 for k, v := range envFlags.EnvMap {
260 envFlag += fmt.Sprintf("--env %s=%s ", k, v)
261 }
262 }
263
264 return t.Execute(w, map[string]string{
265 "EnvFlag": envFlag,
266 "EnvFile": envFlags.EnvFile,
267 "ConfigDir": formatConfigDirArg(configDir),
268 })
269}
270
271func formatConfigDirArg(configDir string) string {
272 if configDir == "" {

Callers 1

PrintEnvrcContentFunction · 0.92

Calls 2

formatConfigDirArgFunction · 0.85
ExecuteMethod · 0.65

Tested by

no test coverage detected