Skip to content

Commit

Permalink
cmd/staticaddr: hide behind build flag
Browse files Browse the repository at this point in the history
  • Loading branch information
sputn1ck authored and hieblmi committed Nov 19, 2024
1 parent 6fba684 commit d72f3d7
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 9 deletions.
19 changes: 10 additions & 9 deletions cmd/loop/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,15 @@ var (
Name: "verbose, v",
Usage: "show expanded details",
}

commands = []cli.Command{
loopOutCommand, loopInCommand, termsCommand,
monitorCommand, quoteCommand, listAuthCommand, fetchL402Command,
listSwapsCommand, swapInfoCommand, getLiquidityParamsCommand,
setLiquidityRuleCommand, suggestSwapCommand, setParamsCommand,
getInfoCommand, abandonSwapCommand, reservationsCommands,
instantOutCommand, listInstantOutsCommand,
}
)

const (
Expand Down Expand Up @@ -142,15 +151,7 @@ func main() {
tlsCertFlag,
macaroonPathFlag,
}
app.Commands = []cli.Command{
loopOutCommand, loopInCommand, termsCommand,
monitorCommand, quoteCommand, listAuthCommand, fetchL402Command,
listSwapsCommand, swapInfoCommand, getLiquidityParamsCommand,
setLiquidityRuleCommand, suggestSwapCommand, setParamsCommand,
getInfoCommand, abandonSwapCommand, reservationsCommands,
instantOutCommand, listInstantOutsCommand,
staticAddressCommands,
}
app.Commands = commands

err := app.Run(os.Args)
if err != nil {
Expand Down
7 changes: 7 additions & 0 deletions cmd/loop/staticaddr.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
//go:build staticaddr
// +build staticaddr

package main

import (
Expand All @@ -18,6 +21,10 @@ import (
"github.com/urfave/cli"
)

func init() {
commands = append(commands, staticAddressCommands)
}

var staticAddressCommands = cli.Command{
Name: "static",
ShortName: "s",
Expand Down

0 comments on commit d72f3d7

Please sign in to comment.