8 Commits

Author SHA1 Message Date
s.solodyagin 6795fa089a rename 2024-04-03 20:59:37 +03:00
Nate Parsons f00d33b57c Use reflect-compatible struct tags in examples 2021-11-23 15:19:08 +11:00
Alec Thomas 862837e6fa Add ConfigFlag for loading configuration through a flag. 2018-09-11 10:02:23 +10:00
Alec Thomas 99ff32a85f Bind Vars. 2018-07-06 10:44:09 +10:00
Alec Thomas 6408010083 Clean up disparity between Context and Kong.
Previously, there was a confusing mix of functionality shared between
the two wherein you would need to use the Kong type for printing errors,
etc. but it did not have access to the context in order to print
context-sensitive usage information. This has been fixed.

Additionally, there are now fuzzy correction suggestions for flags and
commands

Also added a server example which shows how Kong can be used for parsing
in interactive shells. Run with:

    $ go run ./_examples/server/*.go

Then interact with:

    $ ssh -p 6740 127.0.0.1
2018-06-27 09:11:11 +10:00
Alec Thomas 7e022e20b0 Fix example. 2018-06-21 23:22:29 +10:00
Alec Thomas a2ec050947 Implement a robust Context.Run().
This helps when composing large applications from separate command
structs.
2018-06-21 21:50:30 +10:00
Alec Thomas 212ea2a356 Add path, existingfile and existingdir types.
- Document custom types.
- Add docker example.
2018-06-21 16:19:08 +10:00