loopd: export DefaultConfig

pull/202/head
Oliver Gugger 4 years ago
parent bdfd382dec
commit 5f70a05463
No known key found for this signature in database
GPG Key ID: 8E4256593F177720

@ -59,7 +59,9 @@ const (
testnetServer = "test.swap.lightning.today:11010" testnetServer = "test.swap.lightning.today:11010"
) )
var defaultConfig = config{ // DefaultConfig returns all default values for the Config struct.
func DefaultConfig() config {
return config{
Network: "mainnet", Network: "mainnet",
RPCListen: "localhost:11010", RPCListen: "localhost:11010",
RESTListen: "localhost:8081", RESTListen: "localhost:8081",
@ -74,4 +76,5 @@ var defaultConfig = config{
Lnd: &lndConfig{ Lnd: &lndConfig{
Host: "localhost:10009", Host: "localhost:10009",
}, },
}
} }

@ -92,7 +92,7 @@ func newListenerCfg(config *config, rpcCfg RPCConfig) *listenerCfg {
} }
func Start(rpcCfg RPCConfig) error { func Start(rpcCfg RPCConfig) error {
config := defaultConfig config := DefaultConfig()
// Parse command line flags. // Parse command line flags.
parser := flags.NewParser(&config, flags.Default) parser := flags.NewParser(&config, flags.Default)

Loading…
Cancel
Save