Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions go/vt/vtctl/backup.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,12 @@ import (
"vitess.io/vitess/go/vt/logutil"
"vitess.io/vitess/go/vt/mysqlctl"
"vitess.io/vitess/go/vt/mysqlctl/backupstorage"
topodatapb "vitess.io/vitess/go/vt/proto/topodata"
vtrpcpb "vitess.io/vitess/go/vt/proto/vtrpc"
"vitess.io/vitess/go/vt/topo/topoproto"
"vitess.io/vitess/go/vt/vterrors"
"vitess.io/vitess/go/vt/wrangler"

topodatapb "vitess.io/vitess/go/vt/proto/topodata"
vtrpcpb "vitess.io/vitess/go/vt/proto/vtrpc"
)

func init() {
Expand Down
3 changes: 1 addition & 2 deletions go/vt/vtctl/cell_info.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,11 @@ limitations under the License.
package vtctl

import (
"context"
"flag"
"fmt"
"strings"

"context"

"vitess.io/vitess/go/vt/wrangler"

topodatapb "vitess.io/vitess/go/vt/proto/topodata"
Expand Down
3 changes: 1 addition & 2 deletions go/vt/vtctl/cells_aliases.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,11 @@ limitations under the License.
package vtctl

import (
"context"
"flag"
"fmt"
"strings"

"context"

"vitess.io/vitess/go/vt/wrangler"

topodatapb "vitess.io/vitess/go/vt/proto/topodata"
Expand Down
6 changes: 2 additions & 4 deletions go/vt/vtctl/query.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,18 +17,16 @@ limitations under the License.
package vtctl

import (
"context"
"encoding/json"
"errors"
"flag"
"fmt"
"io"
"strconv"

"google.golang.org/protobuf/encoding/prototext"

"context"

"github.com/olekukonko/tablewriter"
"google.golang.org/protobuf/encoding/prototext"

"vitess.io/vitess/go/sqltypes"
"vitess.io/vitess/go/vt/callerid"
Expand Down
5 changes: 2 additions & 3 deletions go/vt/vtctl/reparent.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,15 @@ limitations under the License.
package vtctl

import (
"context"
"flag"
"fmt"

"context"

"vitess.io/vitess/go/vt/mysqlctl"
"vitess.io/vitess/go/vt/topo"
"vitess.io/vitess/go/vt/topo/topoproto"
"vitess.io/vitess/go/vt/wrangler"

"vitess.io/vitess/go/vt/mysqlctl"
topodatapb "vitess.io/vitess/go/vt/proto/topodata"
)

Expand Down
6 changes: 2 additions & 4 deletions go/vt/vtctl/throttler.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,15 @@ limitations under the License.
package vtctl

import (
"context"
"flag"
"fmt"
"strconv"
"strings"
"time"

"google.golang.org/protobuf/encoding/prototext"

"context"

"github.com/olekukonko/tablewriter"
"google.golang.org/protobuf/encoding/prototext"

"vitess.io/vitess/go/vt/logutil"
"vitess.io/vitess/go/vt/throttler"
Expand Down
4 changes: 1 addition & 3 deletions go/vt/vtctl/topo.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ limitations under the License.
package vtctl

import (
"context"
"encoding/json"
"flag"
"fmt"
Expand All @@ -25,9 +26,6 @@ import (

"google.golang.org/protobuf/encoding/protojson"
"google.golang.org/protobuf/encoding/prototext"

"context"

"google.golang.org/protobuf/proto"

"vitess.io/vitess/go/vt/topo"
Expand Down
19 changes: 12 additions & 7 deletions go/vt/vtctl/vtctl.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ COMMAND ARGUMENT DEFINITIONS
*/

import (
"context"
"encoding/json"
"errors"
"flag"
Expand All @@ -95,9 +96,6 @@ import (
"time"

"google.golang.org/protobuf/encoding/protojson"

"context"

"google.golang.org/protobuf/proto"

"vitess.io/vitess/go/cmd/vtctldclient/cli"
Expand Down Expand Up @@ -145,6 +143,9 @@ type command struct {
params string
help string // if help is empty, won't list the command

// if set, PrintAllCommands will not show this command
hidden bool

// deprecation support
deprecated bool
deprecatedBy string
Expand Down Expand Up @@ -360,12 +361,15 @@ var commands = []commandGroup{
name: "ShardReplicationAdd",
method: commandShardReplicationAdd,
params: "<keyspace/shard> <tablet alias> <parent tablet alias>",
help: "HIDDEN Adds an entry to the replication graph in the given cell."},
help: "Adds an entry to the replication graph in the given cell.",
hidden: true,
},
{
name: "ShardReplicationRemove",
method: commandShardReplicationRemove,
params: "<keyspace/shard> <tablet alias>",
help: "HIDDEN Removes an entry from the replication graph in the given cell.",
help: "Removes an entry from the replication graph in the given cell.",
hidden: true,
},
{
name: "ShardReplicationFix",
Expand Down Expand Up @@ -599,7 +603,8 @@ var commands = []commandGroup{
name: "Panic",
method: commandPanic,
params: "",
help: "HIDDEN Triggers a panic on the server side, to test the handling.",
help: "Triggers a panic on the server side, to test the handling.",
hidden: true,
},
},
},
Expand Down Expand Up @@ -4118,7 +4123,7 @@ func PrintAllCommands(logger logutil.Logger) {
for _, group := range commands {
logger.Printf("%s:\n", group.name)
for _, cmd := range group.commands {
if strings.HasPrefix(cmd.help, "HIDDEN") {
if cmd.hidden {
continue
}

Expand Down
1 change: 0 additions & 1 deletion go/vt/vtctl/vtctl_test.go

This file was deleted.

3 changes: 1 addition & 2 deletions go/vt/vtctl/workflow.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,10 @@ limitations under the License.
package vtctl

import (
"context"
"flag"
"fmt"

"context"

"vitess.io/vitess/go/vt/workflow"
"vitess.io/vitess/go/vt/wrangler"
)
Expand Down