Merge pull request #41 from edouardparis/add-version-v0.2.0

v0.2.0
pull/43/head
Edouard 3 years ago committed by GitHub
commit f94ab66280
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -121,9 +121,3 @@ The events are in one of four states:
## Docker ## Docker
If you prefer to run `lntop` from a docker container, `cd docker` and follow [`README`](docker/README.md) there. 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 |

@ -6,6 +6,7 @@ import (
"github.com/edouardparis/lntop/network" "github.com/edouardparis/lntop/network"
) )
type App struct { type App struct {
Config *config.Config Config *config.Config
Logger logging.Logger Logger logging.Logger

@ -7,6 +7,7 @@ import (
cli "gopkg.in/urfave/cli.v2" cli "gopkg.in/urfave/cli.v2"
"github.com/edouardparis/lntop"
"github.com/edouardparis/lntop/app" "github.com/edouardparis/lntop/app"
"github.com/edouardparis/lntop/config" "github.com/edouardparis/lntop/config"
"github.com/edouardparis/lntop/events" "github.com/edouardparis/lntop/events"
@ -15,8 +16,6 @@ import (
"github.com/edouardparis/lntop/ui" "github.com/edouardparis/lntop/ui"
) )
const version = "v0.1.0"
// New creates a new cli app. // New creates a new cli app.
func New() *cli.App { func New() *cli.App {
cli.VersionFlag = &cli.BoolFlag{ cli.VersionFlag = &cli.BoolFlag{
@ -26,7 +25,7 @@ func New() *cli.App {
return &cli.App{ return &cli.App{
Name: "lntop", Name: "lntop",
Version: version, Version: lntop.Version,
Usage: "LN channels viewer", Usage: "LN channels viewer",
EnableShellCompletion: true, EnableShellCompletion: true,
Action: run, Action: run,

@ -5,12 +5,12 @@ import (
"github.com/jroimartin/gocui" "github.com/jroimartin/gocui"
"github.com/edouardparis/lntop"
"github.com/edouardparis/lntop/ui/color" "github.com/edouardparis/lntop/ui/color"
) )
const ( const (
version = "v0.1.0" HELP = "help"
HELP = "help"
) )
type Help struct { type Help struct {
@ -66,19 +66,15 @@ func (h Help) Set(g *gocui.Gui, x0, y0, x1, y1 int) error {
} }
h.view.Frame = false h.view.Frame = false
cyan := color.Cyan() 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, "Released under the MIT License")
fmt.Fprintln(h.view, "") fmt.Fprintln(h.view, "")
fmt.Fprintln(h.view, fmt.Sprintf("%6s %s", fmt.Fprintf(h.view, "%6s show/close this help screen\n", cyan("F1 h:"))
cyan("F1 h:"), "show/close this help screen")) fmt.Fprintf(h.view, "%6s show/close the menu sidebar\n", cyan("F2 m:"))
fmt.Fprintln(h.view, fmt.Sprintf("%6s %s", fmt.Fprintf(h.view, "%6s quit\n", cyan("F10 q:"))
cyan("F2 m:"), "show/close the menu sidebar"))
fmt.Fprintln(h.view, fmt.Sprintf("%6s %s",
cyan("F10 q:"), "quit"))
fmt.Fprintln(h.view, "") fmt.Fprintln(h.view, "")
fmt.Fprintln(h.view, fmt.Sprintf("%6s %s", fmt.Fprintf(h.view, "%6s apply asc/desc order to the rows according to the selected column value\n",
cyan(" a d:"), "apply asc/desc order to the rows according to the selected column value")) cyan(" a d:"))
_, err = g.SetCurrentView(HELP) _, err = g.SetCurrentView(HELP)
return err return err
} }

@ -0,0 +1,3 @@
package lntop
const Version = "v0.2.0"
Loading…
Cancel
Save