go-zero/tools/goctl/docker/docker.go

18 lines
315 B
Go
Raw Normal View History

2020-07-29 17:11:41 +08:00
package docker
import (
"errors"
2020-08-08 16:40:10 +08:00
"github.com/tal-tech/go-zero/tools/goctl/gen"
2020-07-29 17:11:41 +08:00
"github.com/urfave/cli"
)
func DockerCommand(c *cli.Context) error {
goFile := c.String("go")
2020-08-30 23:52:51 +08:00
if len(goFile) == 0 {
return errors.New("-go can't be empty")
2020-07-29 17:11:41 +08:00
}
2020-08-30 23:52:51 +08:00
return gen.GenerateDockerfile(goFile, "-f", "etc/config.yaml")
2020-07-29 17:11:41 +08:00
}