mirror of
https://github.com/crazy-max/diun.git
synced 2025-04-28 20:52:25 +00:00
![dependabot[bot]](/assets/img/avatar_default.png)
Bumps [github.com/alecthomas/kong](https://github.com/alecthomas/kong) from 1.6.0 to 1.6.1. - [Release notes](https://github.com/alecthomas/kong/releases) - [Commits](https://github.com/alecthomas/kong/compare/v1.6.0...v1.6.1) --- updated-dependencies: - dependency-name: github.com/alecthomas/kong dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com>
16 lines
302 B
Go
16 lines
302 B
Go
package kong
|
|
|
|
import (
|
|
"os"
|
|
)
|
|
|
|
// Parse constructs a new parser and parses the default command-line.
|
|
func Parse(cli any, options ...Option) *Context {
|
|
parser, err := New(cli, options...)
|
|
if err != nil {
|
|
panic(err)
|
|
}
|
|
ctx, err := parser.Parse(os.Args[1:])
|
|
parser.FatalIfErrorf(err)
|
|
return ctx
|
|
}
|