mirror of
https://github.com/edouardparis/lntop
synced 2024-11-08 01:10:32 +00:00
Move main.go to directory root
This commit is contained in:
parent
53c3bec033
commit
0b4fe71bd7
@ -7,7 +7,6 @@ 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"
|
||||||
@ -17,7 +16,7 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
// New creates a new cli app.
|
// New creates a new cli app.
|
||||||
func New() *cli.App {
|
func New(version string) *cli.App {
|
||||||
cli.VersionFlag = &cli.BoolFlag{
|
cli.VersionFlag = &cli.BoolFlag{
|
||||||
Name: "version", Aliases: []string{},
|
Name: "version", Aliases: []string{},
|
||||||
Usage: "print the version",
|
Usage: "print the version",
|
||||||
@ -25,7 +24,7 @@ func New() *cli.App {
|
|||||||
|
|
||||||
return &cli.App{
|
return &cli.App{
|
||||||
Name: "lntop",
|
Name: "lntop",
|
||||||
Version: lntop.Version,
|
Version: version,
|
||||||
Usage: "LN channels viewer",
|
Usage: "LN channels viewer",
|
||||||
EnableShellCompletion: true,
|
EnableShellCompletion: true,
|
||||||
Action: run,
|
Action: run,
|
||||||
|
@ -1,15 +0,0 @@
|
|||||||
package main
|
|
||||||
|
|
||||||
import (
|
|
||||||
"log"
|
|
||||||
"os"
|
|
||||||
|
|
||||||
"github.com/edouardparis/lntop/cli"
|
|
||||||
)
|
|
||||||
|
|
||||||
func main() {
|
|
||||||
err := cli.New().Run(os.Args)
|
|
||||||
if err != nil {
|
|
||||||
log.Fatal(err)
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,4 +1,3 @@
|
|||||||
// lntop v0.0.0
|
|
||||||
// Released under the MIT License
|
// Released under the MIT License
|
||||||
//
|
//
|
||||||
// Lightning is a decentralized network using smart contract functionality
|
// Lightning is a decentralized network using smart contract functionality
|
||||||
@ -8,4 +7,20 @@
|
|||||||
//
|
//
|
||||||
// lntop is an interactive text-mode channels viewer for Unix systems.
|
// lntop is an interactive text-mode channels viewer for Unix systems.
|
||||||
// It supports for the moment the Go implementation lnd only.
|
// It supports for the moment the Go implementation lnd only.
|
||||||
package lntop
|
package main
|
||||||
|
|
||||||
|
import (
|
||||||
|
"log"
|
||||||
|
"os"
|
||||||
|
|
||||||
|
"github.com/edouardparis/lntop/cli"
|
||||||
|
)
|
||||||
|
|
||||||
|
const Version = "v0.3.0"
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
err := cli.New(Version).Run(os.Args)
|
||||||
|
if err != nil {
|
||||||
|
log.Fatal(err)
|
||||||
|
}
|
||||||
|
}
|
@ -1,3 +0,0 @@
|
|||||||
package lntop
|
|
||||||
|
|
||||||
const Version = "v0.3.0"
|
|
Loading…
Reference in New Issue
Block a user