man-page
This commit is contained in:
12
main.go
12
main.go
@@ -5,18 +5,22 @@ import (
|
||||
|
||||
goflags "github.com/jessevdk/go-flags"
|
||||
"github.com/motiejus/code/undocker/internal/cmdlxcconfig"
|
||||
"github.com/motiejus/code/undocker/internal/cmdmanpage"
|
||||
"github.com/motiejus/code/undocker/internal/cmdrootfs"
|
||||
)
|
||||
|
||||
func main() {
|
||||
flags := goflags.NewParser(nil, goflags.Default)
|
||||
parser := 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)
|
||||
manpage := cmdmanpage.NewCommand(parser)
|
||||
parser.AddCommand("rootfs", rootfs.ShortDesc(), rootfs.LongDesc(), rootfs)
|
||||
parser.AddCommand("lxcconfig", lxcconfig.ShortDesc(), lxcconfig.LongDesc(), lxcconfig)
|
||||
m, _ := parser.AddCommand("man-page", "", "", manpage)
|
||||
m.Hidden = true
|
||||
|
||||
_, err := flags.Parse()
|
||||
_, err := parser.Parse()
|
||||
if err != nil {
|
||||
os.Exit(1)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user