Merge pull request #5446 from allenxu404/i5098

Change subcommand `velero restic` to `velero repo`
This commit is contained in:
lyndon
2022-10-17 18:28:51 +08:00
committed by GitHub
5 changed files with 7 additions and 44 deletions

View File

@@ -33,7 +33,7 @@ func NewGetCommand(f client.Factory, use string) *cobra.Command {
c := &cobra.Command{
Use: use,
Short: "Get restic repositories",
Short: "Get repositories",
Run: func(c *cobra.Command, args []string) {
err := output.ValidateFlags(c)
cmd.CheckError(err)

View File

@@ -22,11 +22,11 @@ import (
"github.com/vmware-tanzu/velero/pkg/client"
)
func NewRepositoryCommand(f client.Factory) *cobra.Command {
func NewCommand(f client.Factory) *cobra.Command {
c := &cobra.Command{
Use: "repo",
Short: "Work with restic repositories",
Long: "Work with restic repositories",
Short: "Work with repositories",
Long: "Work with repositories",
}
c.AddCommand(

View File

@@ -1,38 +0,0 @@
/*
Copyright 2018 the Velero contributors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package restic
import (
"github.com/spf13/cobra"
"github.com/vmware-tanzu/velero/pkg/client"
"github.com/vmware-tanzu/velero/pkg/cmd/cli/restic/repo"
)
func NewCommand(f client.Factory) *cobra.Command {
c := &cobra.Command{
Use: "restic",
Short: "Work with restic",
Long: "Work with restic",
}
c.AddCommand(
repo.NewRepositoryCommand(f),
)
return c
}