fast route to getting a single binary

roger peppe rogpeppe at gmail.com
Sun Oct 7 07:55:18 UTC 2012


it works, but the Go tool is a little flaky doing it, unfortunately.

	package main
	
	import (
		"os"
		"fmt"
		"path/filepath"
		jujudmain "launchpad.net/juju-core/cmd/jujud"
		jujucmain "launchpad.net/juju-core/cmd/jujuc"
		jujumain "launchpad.net/juju-core/cmd/juju"
	)
	
	func main() {
		switch filepath.Base(os.Args[0]) {
		case "jujud":
			jujudmain.Main(os.Args)
		case "juju":
			jujumain.Main(os.Args)
		default:
			jujucmain.Main(os.Args)
		}
	}



More information about the Juju-dev mailing list