diff options
author | 6543 <6543@obermui.de> | 2022-01-20 18:46:10 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-20 18:46:10 +0100 |
commit | 54e9ee37a7a301dbe74d46fd3c87712e6120e9bf (patch) | |
tree | 1be12fb072625c1b896b9d72f7912b018aad502b /services/migrations/codebase.go | |
parent | 1d98d205f5825f40110e6628b61a97c91ac7f72d (diff) | |
download | gitea-54e9ee37a7a301dbe74d46fd3c87712e6120e9bf.tar.gz gitea-54e9ee37a7a301dbe74d46fd3c87712e6120e9bf.zip |
format with gofumpt (#18184)
* gofumpt -w -l .
* gofumpt -w -l -extra .
* Add linter
* manual fix
* change make fmt
Diffstat (limited to 'services/migrations/codebase.go')
-rw-r--r-- | services/migrations/codebase.go | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/services/migrations/codebase.go b/services/migrations/codebase.go index 395bc6152e..13e9327c33 100644 --- a/services/migrations/codebase.go +++ b/services/migrations/codebase.go @@ -30,8 +30,7 @@ func init() { } // CodebaseDownloaderFactory defines a downloader factory -type CodebaseDownloaderFactory struct { -} +type CodebaseDownloaderFactory struct{} // New returns a downloader related to this factory according MigrateOptions func (f *CodebaseDownloaderFactory) New(ctx context.Context, opts base.MigrateOptions) (base.Downloader, error) { @@ -88,7 +87,7 @@ func (d *CodebaseDownloader) SetContext(ctx context.Context) { func NewCodebaseDownloader(ctx context.Context, projectURL *url.URL, project, repoName, username, password string) *CodebaseDownloader { baseURL, _ := url.Parse("https://api3.codebasehq.com") - var downloader = &CodebaseDownloader{ + downloader := &CodebaseDownloader{ ctx: ctx, baseURL: baseURL, projectURL: projectURL, @@ -206,7 +205,7 @@ func (d *CodebaseDownloader) GetMilestones() ([]*base.Milestone, error) { return nil, err } - var milestones = make([]*base.Milestone, 0, len(rawMilestones.TicketingMilestone)) + milestones := make([]*base.Milestone, 0, len(rawMilestones.TicketingMilestone)) for _, milestone := range rawMilestones.TicketingMilestone { var deadline *time.Time if len(milestone.Deadline.Value) > 0 { @@ -256,7 +255,7 @@ func (d *CodebaseDownloader) GetLabels() ([]*base.Label, error) { return nil, err } - var labels = make([]*base.Label, 0, len(rawTypes.TicketingType)) + labels := make([]*base.Label, 0, len(rawTypes.TicketingType)) for _, label := range rawTypes.TicketingType { labels = append(labels, &base.Label{ Name: label.Name, @@ -400,7 +399,8 @@ func (d *CodebaseDownloader) GetIssues(page, perPage int) ([]*base.Issue, bool, Created: issue.CreatedAt.Value, Updated: issue.UpdatedAt.Value, Labels: []*base.Label{ - {Name: issue.Type.Name}}, + {Name: issue.Type.Name}, + }, Context: codebaseIssueContext{ foreignID: issue.TicketID.Value, localID: issue.TicketID.Value, |