MCPcopy Index your code
hub / github.com/commitdev/zero / chooseStack

Function chooseStack

internal/init/init.go:183–196  ·  view source on GitHub ↗
(reg registry.Registry)

Source from the content-addressed store, hash-verified

181}
182
183func chooseStack(reg registry.Registry) []string {
184 showInfoBox("A stack is a group of Zero modules. They will be pulled in from the registry and templated to create the different parts of your project such as infrastructure, backend, frontend, etc.")
185
186 providerPrompt := promptui.Select{
187 Label: "Pick the stack you'd like to use",
188 Items: registry.AvailableLabels(reg),
189 }
190 _, providerResult, err := providerPrompt.Run()
191 if err != nil {
192 exit.Fatal("Prompt failed %v\n", err)
193 }
194
195 return registry.GetModulesByName(reg, providerResult)
196}
197
198func defaultProjConfig() projectconfig.ZeroProjectConfig {
199 return projectconfig.ZeroProjectConfig{

Callers 1

InitFunction · 0.85

Calls 4

AvailableLabelsFunction · 0.92
FatalFunction · 0.92
GetModulesByNameFunction · 0.92
showInfoBoxFunction · 0.85

Tested by

no test coverage detected