diff --git a/bee.go b/bee.go index 21fa1d0..268166e 100644 --- a/bee.go +++ b/bee.go @@ -99,12 +99,7 @@ func (c *Command) Options() map[string]string { c.Flag.VisitAll(func(f *flag.Flag) { defaultVal := f.DefValue if len(defaultVal) > 0 { - if strings.Contains(defaultVal, ":") { - // Truncate the flag's default value by appending '...' at the end - options[f.Name+"="+strings.Split(defaultVal, ":")[0]+":..."] = f.Usage - } else { - options[f.Name+"="+defaultVal] = f.Usage - } + options[f.Name+"="+defaultVal] = f.Usage } else { options[f.Name] = f.Usage } @@ -210,7 +205,9 @@ Use {{"bee help [topic]" | bold}} for more information about that topic. var helpTemplate = `{{"USAGE" | headline}} {{.UsageLine | printf "bee %s" | bold}} {{if .Options}}{{endline}}{{"OPTIONS" | headline}}{{range $k,$v := .Options}} - {{$k | printf "-%-12s" | bold}} {{$v}}{{end}}{{endline}}{{end}} + {{$k | printf "-%s" | bold}} + {{$v}} + {{end}}{{end}} {{"DESCRIPTION" | headline}} {{tmpltostr .Long . | trim}} ` diff --git a/dockerize.go b/dockerize.go index 6aee753..827fc8e 100644 --- a/dockerize.go +++ b/dockerize.go @@ -74,7 +74,7 @@ var ( func init() { fs := flag.NewFlagSet("dockerize", flag.ContinueOnError) - fs.StringVar(&baseImage, "image", "", "Sets the base image of the Docker container.") + fs.StringVar(&baseImage, "image", "library/golang", "Set the base image of the Docker container.") fs.StringVar(&expose, "expose", "8080", "Port(s) to expose in the Docker container.") cmdDockerize.Flag = *fs } @@ -90,10 +90,6 @@ func dockerizeApp(cmd *Command, args []string) int { dir, err := filepath.Abs(".") MustCheck(err) - if len(baseImage) == 0 { - baseImage = "library/golang:latest" - } - appdir := strings.Replace(dir, gopath, "", 1) // In case of multiple ports to expose inside the container,