Skip to content

support sub command  #21

Description

@humboldt-xie

like docker
docker [OPTIONS] COMMAND

ex:
docker --debug run --it busybox

go:

type MyApp struct {
      Debug bool `flag:"debug"`
      CurCommand interface{} `flag:"&command"`
      Run  RunCmd `command:"run"`
      Build BuildCmd `command:"build"`
} 
type RunCmd struct {
       Interactive bool `flag:"i" help:"Keep STDIN open even if not attached"`
}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions