refactor: decouple context from migration structs (#33399)
Use context as much as possible. --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
This commit is contained in:
parent
466cc725bc
commit
1ec8d80fa3
23 changed files with 455 additions and 509 deletions
|
@ -28,12 +28,8 @@ func NewPlainGitDownloader(ownerName, repoName, remoteURL string) *PlainGitDownl
|
|||
}
|
||||
}
|
||||
|
||||
// SetContext set context
|
||||
func (g *PlainGitDownloader) SetContext(ctx context.Context) {
|
||||
}
|
||||
|
||||
// GetRepoInfo returns a repository information
|
||||
func (g *PlainGitDownloader) GetRepoInfo() (*base.Repository, error) {
|
||||
func (g *PlainGitDownloader) GetRepoInfo(_ context.Context) (*base.Repository, error) {
|
||||
// convert github repo to stand Repo
|
||||
return &base.Repository{
|
||||
Owner: g.ownerName,
|
||||
|
@ -43,6 +39,6 @@ func (g *PlainGitDownloader) GetRepoInfo() (*base.Repository, error) {
|
|||
}
|
||||
|
||||
// GetTopics return empty string slice
|
||||
func (g PlainGitDownloader) GetTopics() ([]string, error) {
|
||||
func (g PlainGitDownloader) GetTopics(_ context.Context) ([]string, error) {
|
||||
return []string{}, nil
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue