refactor: remove unused code
This commit is contained in:
parent
54de75db82
commit
daf4922176
1 changed files with 0 additions and 12 deletions
|
|
@ -21,29 +21,19 @@ type RenameOptions struct {
|
|||
IO *iostreams.IOStreams
|
||||
Config func() (config.Config, error)
|
||||
HttpClient func() (*http.Client, error)
|
||||
Prompter iprompter
|
||||
DoConfirm bool
|
||||
|
||||
Selector string
|
||||
OldFileName string
|
||||
NewFileName string
|
||||
}
|
||||
|
||||
type iprompter interface {
|
||||
Input(string, string) (string, error)
|
||||
Confirm(string, bool) (bool, error)
|
||||
}
|
||||
|
||||
func NewCmdRename(f *cmdutil.Factory, runf func(*RenameOptions) error) *cobra.Command {
|
||||
opts := &RenameOptions{
|
||||
IO: f.IOStreams,
|
||||
HttpClient: f.HttpClient,
|
||||
Config: f.Config,
|
||||
Prompter: f.Prompter,
|
||||
}
|
||||
|
||||
var confirm bool
|
||||
|
||||
cmd := &cobra.Command{
|
||||
Use: "rename [<id> | <url>] <oldFilename> <newFilename>",
|
||||
Short: "Rename a file in a gist",
|
||||
|
|
@ -66,8 +56,6 @@ func NewCmdRename(f *cmdutil.Factory, runf func(*RenameOptions) error) *cobra.Co
|
|||
},
|
||||
}
|
||||
|
||||
cmd.Flags().BoolVarP(&confirm, "yes", "y", false, "Skip the confirmation prompt")
|
||||
|
||||
return cmd
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue