Skip to content

Commit

Permalink
remove unused variables ; make format check
Browse files Browse the repository at this point in the history
  • Loading branch information
0pcom committed Dec 25, 2023
1 parent 834e251 commit c5cecc0
Showing 1 changed file with 48 additions and 53 deletions.
101 changes: 48 additions & 53 deletions cmd/skywire-deployment/skywire.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ import (
dmsgdisc "github.com/skycoin/dmsg/cmd/dmsg-discovery/commands"
dmsgserver "github.com/skycoin/dmsg/cmd/dmsg-server/commands"
dmsgcurl "github.com/skycoin/dmsg/cmd/dmsgcurl/commands"
dmsgweb "github.com/skycoin/dmsg/cmd/dmsgweb/commands"
dmsghttp "github.com/skycoin/dmsg/cmd/dmsghttp/commands"
dmsgptycli "github.com/skycoin/dmsg/cmd/dmsgpty-cli/commands"
dmsgptyhost "github.com/skycoin/dmsg/cmd/dmsgpty-host/commands"
dmsgptyui "github.com/skycoin/dmsg/cmd/dmsgpty-ui/commands"
dmsgweb "github.com/skycoin/dmsg/cmd/dmsgweb/commands"
sd "github.com/skycoin/skycoin-service-discovery/cmd/service-discovery/commands"
"github.com/spf13/cobra"

Expand All @@ -37,11 +37,6 @@ import (
"github.com/skycoin/skywire/pkg/visor"
)

var(
hiddenflags []string
allhelp bool
)

func init() {
dmsgptyCmd.AddCommand(
dmsgptycli.RootCmd,
Expand Down Expand Up @@ -78,13 +73,13 @@ func init() {
svcCmd,
dmsgCmd,
)
visor.RootCmd.Long= `
visor.RootCmd.Long = `
┌─┐┬┌─┬ ┬┬ ┬┬┬─┐┌─┐ ┬ ┬┬┌─┐┌─┐┬─┐
└─┐├┴┐└┬┘││││├┬┘├┤───└┐┌┘│└─┐│ │├┬┘
└─┘┴ ┴ ┴ └┴┘┴┴└─└─┘ └┘ ┴└─┘└─┘┴└─`
dmsgcurl.RootCmd.Use="curl"
dmsgweb.RootCmd.Use="web"
setupnode.RootCmd.Use="sn"
dmsgcurl.RootCmd.Use = "curl"
dmsgweb.RootCmd.Use = "web"
setupnode.RootCmd.Use = "sn"

var helpflag bool
rootCmd.SetUsageTemplate(help)
Expand Down Expand Up @@ -152,50 +147,50 @@ var dmsgptyCmd = &cobra.Command{
}

func main() {
commands := []*cobra.Command{
dmsgptycli.RootCmd,
dmsgptyhost.RootCmd,
dmsgptyui.RootCmd,
dmsgptyCmd,
dmsgdisc.RootCmd,
dmsgserver.RootCmd,
dmsghttp.RootCmd,
dmsgcurl.RootCmd,
dmsgweb.RootCmd,
dmsgCmd,
tpd.RootCmd,
tps.RootCmd,
tpdm.RootCmd,
ar.RootCmd,
rf.RootCmd,
confbs.RootCmd,
kg.RootCmd,
lc.RootCmd,
nv.RootCmd,
pvm.RootCmd,
se.RootCmd,
dmsgm.RootCmd,
sd.RootCmd,
svcCmd,
setupnode.RootCmd,
visor.RootCmd,
skywirecli.RootCmd,
rootCmd,
commands := []*cobra.Command{
dmsgptycli.RootCmd,
dmsgptyhost.RootCmd,
dmsgptyui.RootCmd,
dmsgptyCmd,
dmsgdisc.RootCmd,
dmsgserver.RootCmd,
dmsghttp.RootCmd,
dmsgcurl.RootCmd,
dmsgweb.RootCmd,
dmsgCmd,
tpd.RootCmd,
tps.RootCmd,
tpdm.RootCmd,
ar.RootCmd,
rf.RootCmd,
confbs.RootCmd,
kg.RootCmd,
lc.RootCmd,
nv.RootCmd,
pvm.RootCmd,
se.RootCmd,
dmsgm.RootCmd,
sd.RootCmd,
svcCmd,
setupnode.RootCmd,
visor.RootCmd,
skywirecli.RootCmd,
rootCmd,
}
for _, cmd := range commands {
cc.Init(&cc.Config{
RootCmd: cmd,
Headings: cc.HiBlue + cc.Bold,
Commands: cc.HiBlue + cc.Bold,
CmdShortDescr: cc.HiBlue,
Example: cc.HiBlue + cc.Italic,
ExecName: cc.HiBlue + cc.Bold,
Flags: cc.HiBlue + cc.Bold,
FlagsDescr: cc.HiBlue,
NoExtraNewlines: true,
NoBottomNewline: true,
})
}
for _, cmd := range commands {
cc.Init(&cc.Config{
RootCmd: cmd,
Headings: cc.HiBlue + cc.Bold,
Commands: cc.HiBlue + cc.Bold,
CmdShortDescr: cc.HiBlue,
Example: cc.HiBlue + cc.Italic,
ExecName: cc.HiBlue + cc.Bold,
Flags: cc.HiBlue + cc.Bold,
FlagsDescr: cc.HiBlue,
NoExtraNewlines: true,
NoBottomNewline: true,
})
}

if err := rootCmd.Execute(); err != nil {
fmt.Println(err)
Expand Down

0 comments on commit c5cecc0

Please sign in to comment.