Skip to content

Commit

Permalink
added App.Args()
Browse files Browse the repository at this point in the history
  • Loading branch information
hedzr committed Mar 30, 2024
1 parent ea89c9b commit 7f511dd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions builder/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ func (s *appS) Name() string { return s.root.AppName }
func (s *appS) Version() string { return s.root.Version }
func (s *appS) Worker() cli.Runner { return s.Runner }
func (s *appS) Root() *cli.RootCommand { return s.root }
func (s *appS) Args() []string { return s.args }

func (s *appS) Build() {
if sr, ok := s.Runner.(setRoot); ok {
Expand Down
2 changes: 2 additions & 0 deletions cli/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,6 @@ type App interface {

Name() string // this app name
Version() string // this app version

Args() []string // command-line args
}

0 comments on commit 7f511dd

Please sign in to comment.