0
0
Fork 0
mirror of https://github.com/crazy-max/diun.git synced 2025-04-28 20:52:25 +00:00
crazy-max_diun/vendor/github.com/alecthomas/kong/global.go
dependabot[bot] 1e6b5759bd
chore(deps): bump github.com/alecthomas/kong from 1.6.0 to 1.6.1
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>
2025-01-07 07:26:07 +00:00

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
}