undocker/main.go

26 lines
563 B
Go
Raw Normal View History

2021-05-24 00:11:57 +03:00
package main
import (
"os"
goflags "github.com/jessevdk/go-flags"
2021-05-24 00:11:58 +03:00
2021-05-24 00:11:58 +03:00
"github.com/motiejus/code/undocker/internal/cmdlxcconfig"
"github.com/motiejus/code/undocker/internal/cmdrootfs"
2021-05-24 00:11:57 +03:00
)
func main() {
2021-05-24 00:11:58 +03:00
flags := goflags.NewParser(nil, goflags.Default)
rootfs := cmdrootfs.NewCommand()
lxcconfig := cmdlxcconfig.NewCommand()
flags.AddCommand("rootfs", rootfs.ShortDesc(), rootfs.LongDesc(), rootfs)
flags.AddCommand("lxcconfig", lxcconfig.ShortDesc(), lxcconfig.LongDesc(), lxcconfig)
_, err := flags.Parse()
if err != nil {
2021-05-24 00:11:57 +03:00
os.Exit(1)
}
os.Exit(0)
}