commands: move catalog subcommands to subdirs

This commit is contained in:
Frank Schroeder 2017-10-17 13:15:23 +02:00 committed by Frank Schröder
parent abd7c73627
commit 0a9478b1f1
9 changed files with 16 additions and 16 deletions

View File

@ -1,4 +1,4 @@
package cat
package catalog
import (
"github.com/hashicorp/consul/command/flags"

View File

@ -1,4 +1,4 @@
package cat
package catalog
import (
"strings"

View File

@ -1,4 +1,4 @@
package catlistdc
package dc
import (
"flag"

View File

@ -1,4 +1,4 @@
package catlistdc
package dc
import (
"strings"

View File

@ -1,4 +1,4 @@
package catlistnodes
package nodes
import (
"flag"

View File

@ -1,4 +1,4 @@
package catlistnodes
package nodes
import (
"strings"

View File

@ -1,4 +1,4 @@
package catlistsvc
package services
import (
"bytes"

View File

@ -1,4 +1,4 @@
package catlistsvc
package services
import (
"strings"

View File

@ -6,10 +6,10 @@ import (
"syscall"
agentcmd "github.com/hashicorp/consul/command/agent"
"github.com/hashicorp/consul/command/cat"
"github.com/hashicorp/consul/command/catlistdc"
"github.com/hashicorp/consul/command/catlistnodes"
"github.com/hashicorp/consul/command/catlistsvc"
"github.com/hashicorp/consul/command/catalog"
catlistdccmd "github.com/hashicorp/consul/command/catalog/list/dc"
catlistnodescmd "github.com/hashicorp/consul/command/catalog/list/nodes"
catlistsvccmd "github.com/hashicorp/consul/command/catalog/list/services"
"github.com/hashicorp/consul/command/event"
execmd "github.com/hashicorp/consul/command/exec"
"github.com/hashicorp/consul/command/forceleave"
@ -66,10 +66,10 @@ func init() {
), nil
},
"catalog": func() (cli.Command, error) { return cat.New(), nil },
"catalog datacenters": func() (cli.Command, error) { return catlistdc.New(ui), nil },
"catalog nodes": func() (cli.Command, error) { return catlistnodes.New(ui), nil },
"catalog services": func() (cli.Command, error) { return catlistsvc.New(ui), nil },
"catalog": func() (cli.Command, error) { return catalog.New(), nil },
"catalog datacenters": func() (cli.Command, error) { return catlistdccmd.New(ui), nil },
"catalog nodes": func() (cli.Command, error) { return catlistnodescmd.New(ui), nil },
"catalog services": func() (cli.Command, error) { return catlistsvccmd.New(ui), nil },
"event": func() (cli.Command, error) { return event.New(ui), nil },
"exec": func() (cli.Command, error) { return execmd.New(ui, makeShutdownCh()), nil },
"force-leave": func() (cli.Command, error) { return forceleave.New(ui), nil },