2019-01-24 16:28:25 +03:00
|
|
|
package main
|
|
|
|
|
|
|
|
import (
|
|
|
|
"fmt"
|
|
|
|
"os"
|
|
|
|
|
|
|
|
flags "github.com/jessevdk/go-flags"
|
|
|
|
"github.com/lightningnetwork/lnd"
|
|
|
|
)
|
|
|
|
|
|
|
|
func main() {
|
|
|
|
// Call the "real" main in a nested manner so the defers will properly
|
|
|
|
// be executed in the case of a graceful shutdown.
|
2019-07-09 15:04:51 +03:00
|
|
|
if err := lnd.Main(lnd.ListenerCfg{}); err != nil {
|
2019-01-24 16:28:25 +03:00
|
|
|
if e, ok := err.(*flags.Error); ok && e.Type == flags.ErrHelp {
|
|
|
|
} else {
|
|
|
|
fmt.Fprintln(os.Stderr, err)
|
|
|
|
}
|
|
|
|
os.Exit(1)
|
|
|
|
}
|
|
|
|
}
|