It is fine... Just not what I'm used to. :-)
On Mar 22, 2014 5:25 PM, "Riobard Zhan" <notifications@github.com> wrote:

> In config.go:
>
> > +	flag.UintVarP(&B2D.Memory, "memory", "m", 1024, "virtual machine memory size (in MB).")
> > +	flag.Uint16Var(&B2D.SSHPort, "sshport", 2022, "host SSH port (forward to port 22 in VM).")
> > +	flag.Uint16Var(&B2D.DockerPort, "dockerport", 4243, "host Docker port (forward to port 4243 in VM).")
> > +	flag.IPVar(&B2D.HostIP, "hostip", net.ParseIP("192.168.59.3"), "VirtualBox host-only network IP address.")
> > +	flag.IPMaskVar(&B2D.NetMask, "netmask", flag.ParseIPv4Mask("255.255.255.0"), "VirtualBox host-only network mask.")
> > +	flag.BoolVar(&B2D.DHCPEnabled, "dhcp", true, "enable VirtualBox host-only network DHCP.")
> > +	flag.IPVar(&B2D.DHCPIP, "dhcpip", net.ParseIP("192.168.59.99"), "VirtualBox host-only network DHCP server address.")
> > +	flag.IPVar(&B2D.LowerIP, "lowerip", net.ParseIP("192.168.59.103"), "VirtualBox host-only network DHCP lower bound.")
> > +	flag.IPVar(&B2D.UpperIP, "upperip", net.ParseIP("192.168.59.254"), "VirtualBox host-only network DHCP upper bound.")
> > +	flag.StringVar(&B2D.VM, "vm", "boot2docker-vm", "virtual machine name.")
> > +
> > +	flag.StringVarP(&B2D.Dir, "dir", "d", dir, "boot2docker config directory.")
> > +	flag.StringVar(&B2D.ISO, "iso", filepath.Join(dir, "boot2docker.iso"), "path to boot2docker ISO image.")
> > +
> > +	osArgs := os.Args // save original os.Args
> > +	// Insert profile args before command-line args so that command-line overrides profile.
>
> Another instance where the code review tool is broken :)
>
> I still don't see any obvious benefits of putting flag definition into
> init(). I'll do more research later to figure out what the restrictions
> in init() are. Previously I tend to avoid init() because its behavior is
> quite different than other functions.
>
> Do you think the way I do flag parsing now is OK?
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/boot2docker/boot2docker-cli/pull/70/files#r10864972>
> .
>