INNER CODE UNIT · Go
rootAction
container2wasm/container2wasm · cmd/c2w/main.go:94
func rootAction(clicontext *cli.Context) error {
if clicontext.Bool("show-dockerfile") {
fmt.Printf("%s", vendor.Dockerfile)
fmt.Printf("\n")
return nil
}
arg1 := clicontext.Args().First()
if arg1 == "" {
if clicontext.Bool("external-bundle") {
return fmt.Errorf("specify output image name")
}
return fmt.Errorf("specify image name")
}
var outputPath string
var needsImg bool
if clicontext.Bool("external-bundle") || clicontext.String("pack") != "" {
outputPath = arg1
needsImg = false