Cool.  Makes sense.  Thanks!
On Mar 22, 2014 5:35 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.
>
> I believe this is the reason to put flag definition in init():
>
> init(), unlike main(), is called when you run unit tests using "go test"
> for your package.
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/boot2docker/boot2docker-cli/pull/70/files#r10865018>
> .
>