Cleanup SyncOptions

This commit is contained in:
Sam Coe 2021-06-11 13:51:25 -04:00
parent 8d61b96bde
commit 2729af50df
No known key found for this signature in database
GPG key ID: 8E322C20F811D086

View file

@ -19,27 +19,25 @@ import (
)
type SyncOptions struct {
HttpClient func() (*http.Client, error)
IO *iostreams.IOStreams
BaseRepo func() (ghrepo.Interface, error)
Remotes func() (context.Remotes, error)
CurrentBranch func() (string, error)
Git gitClient
DestArg string
SrcArg string
Branch string
Force bool
SkipConfirm bool
HttpClient func() (*http.Client, error)
IO *iostreams.IOStreams
BaseRepo func() (ghrepo.Interface, error)
Remotes func() (context.Remotes, error)
Git gitClient
DestArg string
SrcArg string
Branch string
Force bool
SkipConfirm bool
}
func NewCmdSync(f *cmdutil.Factory, runF func(*SyncOptions) error) *cobra.Command {
opts := SyncOptions{
HttpClient: f.HttpClient,
IO: f.IOStreams,
BaseRepo: f.BaseRepo,
Remotes: f.Remotes,
CurrentBranch: f.Branch,
Git: &gitExecuter{gitCommand: git.GitCommand},
HttpClient: f.HttpClient,
IO: f.IOStreams,
BaseRepo: f.BaseRepo,
Remotes: f.Remotes,
Git: &gitExecuter{gitCommand: git.GitCommand},
}
cmd := &cobra.Command{