Package matthewdunsdon/egkong
provides you with a library to seamlessly integrate kong
with egcmd
.
Currently, this library is not intended for use in production, predominantly as it has been created learning golang.
With a correctly configured Go toolchain:
go get github.com/matthewdunsdon/egkong
The simplist approach is to create a configured kingpin app is to use the .New()
function:
import (
"fmt"
"os"
"github.com/alecthomas/kong"
"github.com/matthewdunsdon/egkong"
)
var cli struct {
// kong cli
}
var (
parser, appExamples = egkong.New(&cli, kong.Name("myapp"), kong.Description("This is my app."))
_ = appExamples.Example("init", "Ius legimus nonumes te, pri dicat nominavi copiosae id, odio rebum facilis ea pro.")
initCmd = app.Command("init", "Initialise cashflow data.")
initCmdEx = appExamples.Command("init")
_ = initCmdEx.Example("--yes", "At vis primis debitis, ei verear omittantur signiferumque mei, quo esse aperiri an. Dolore vocent consequuntur pro an, nam no iusto tamquam suscipit.")
)
MIT licensed. See the LICENSE file for details.