mirror of
https://github.com/sern-handler/cli
synced 2026-06-23 00:02:27 +00:00
34 lines
462 B
Go
34 lines
462 B
Go
package extra
|
|
|
|
import (
|
|
"os"
|
|
|
|
"github.com/AlecAivazis/survey/v2"
|
|
"github.com/gookit/color"
|
|
)
|
|
|
|
func Execute() {
|
|
answers := struct {
|
|
Extra string
|
|
}{}
|
|
|
|
err := survey.Ask(questions, &answers)
|
|
|
|
if err != nil {
|
|
color.Error.Prompt("Adding extras failed, exiting.")
|
|
|
|
os.Exit(1)
|
|
}
|
|
|
|
switch answers.Extra {
|
|
case "Dockerfile":
|
|
err = addDockerfile()
|
|
|
|
if err != nil {
|
|
color.Error.Prompt("Adding the Dockerfile failed, exiting.")
|
|
|
|
os.Exit(1)
|
|
}
|
|
}
|
|
}
|