diff --git a/README.md b/README.md index ca06a71..bfa2a41 100644 --- a/README.md +++ b/README.md @@ -121,9 +121,3 @@ The events are in one of four states: ## Docker If you prefer to run `lntop` from a docker container, `cd docker` and follow [`README`](docker/README.md) there. - -## Compatibility - -| lntop | lightningnetwork/lnd | -|--------|----------------------| -| v0.0.1 | v0.5.1 | diff --git a/app/app.go b/app/app.go index 85ab5c8..a50eea4 100644 --- a/app/app.go +++ b/app/app.go @@ -6,6 +6,7 @@ import ( "github.com/edouardparis/lntop/network" ) + type App struct { Config *config.Config Logger logging.Logger diff --git a/cli/cli.go b/cli/cli.go index e5b0211..88cd102 100644 --- a/cli/cli.go +++ b/cli/cli.go @@ -7,6 +7,7 @@ import ( cli "gopkg.in/urfave/cli.v2" + "github.com/edouardparis/lntop" "github.com/edouardparis/lntop/app" "github.com/edouardparis/lntop/config" "github.com/edouardparis/lntop/events" @@ -15,8 +16,6 @@ import ( "github.com/edouardparis/lntop/ui" ) -const version = "v0.1.0" - // New creates a new cli app. func New() *cli.App { cli.VersionFlag = &cli.BoolFlag{ @@ -26,7 +25,7 @@ func New() *cli.App { return &cli.App{ Name: "lntop", - Version: version, + Version: lntop.Version, Usage: "LN channels viewer", EnableShellCompletion: true, Action: run, diff --git a/ui/views/help.go b/ui/views/help.go index 19a11be..3a59e0a 100644 --- a/ui/views/help.go +++ b/ui/views/help.go @@ -5,12 +5,12 @@ import ( "github.com/jroimartin/gocui" + "github.com/edouardparis/lntop" "github.com/edouardparis/lntop/ui/color" ) const ( - version = "v0.1.0" - HELP = "help" + HELP = "help" ) type Help struct { @@ -66,19 +66,15 @@ func (h Help) Set(g *gocui.Gui, x0, y0, x1, y1 int) error { } h.view.Frame = false cyan := color.Cyan() - fmt.Fprintln(h.view, fmt.Sprintf("lntop %s - (C) 2019 Edouard Paris", version)) + fmt.Fprintf(h.view, "lntop %s - (C) 2019 Edouard Paris\n", lntop.Version) fmt.Fprintln(h.view, "Released under the MIT License") fmt.Fprintln(h.view, "") - fmt.Fprintln(h.view, fmt.Sprintf("%6s %s", - cyan("F1 h:"), "show/close this help screen")) - fmt.Fprintln(h.view, fmt.Sprintf("%6s %s", - cyan("F2 m:"), "show/close the menu sidebar")) - fmt.Fprintln(h.view, fmt.Sprintf("%6s %s", - cyan("F10 q:"), "quit")) - + fmt.Fprintf(h.view, "%6s show/close this help screen\n", cyan("F1 h:")) + fmt.Fprintf(h.view, "%6s show/close the menu sidebar\n", cyan("F2 m:")) + fmt.Fprintf(h.view, "%6s quit\n", cyan("F10 q:")) fmt.Fprintln(h.view, "") - fmt.Fprintln(h.view, fmt.Sprintf("%6s %s", - cyan(" a d:"), "apply asc/desc order to the rows according to the selected column value")) + fmt.Fprintf(h.view, "%6s apply asc/desc order to the rows according to the selected column value\n", + cyan(" a d:")) _, err = g.SetCurrentView(HELP) return err } diff --git a/version.go b/version.go new file mode 100644 index 0000000..6abec05 --- /dev/null +++ b/version.go @@ -0,0 +1,3 @@ +package lntop + +const Version = "v0.2.0"