isle/entrypoint/src/cmd/entrypoint/main.go

33 lines
590 B
Go
Raw Normal View History

package main
import (
"os"
crypticnet "cryptic-net"
)
// The purpose of this binary is to act as the entrypoint of the cryptic-net
// process. It processes the command-line arguments which are passed in, and
// then passes execution along to an appropriate binary housed in AppDir/bin
// (usually a bash script, which is more versatile than a go program).
func main() {
2022-10-26 22:23:39 +00:00
env := crypticnet.NewEnv()
2022-10-26 22:23:39 +00:00
err := subCmdCtx{
args: os.Args[1:],
env: env,
}.doSubCmd(
subCmdAdmin,
subCmdDaemon,
subCmdGarage,
subCmdHosts,
subCmdVersion,
)
if err != nil {
panic(err)
}
}