Skip to content

Commit

Permalink
refactor: import order. (go-gitea#3736)
Browse files Browse the repository at this point in the history
  • Loading branch information
appleboy authored and lunny committed Mar 29, 2018
1 parent a8beef8 commit 1c5cbc3
Show file tree
Hide file tree
Showing 18 changed files with 36 additions and 31 deletions.
4 changes: 2 additions & 2 deletions routers/api/v1/repo/branch.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
package repo

import (
api "code.gitea.io/sdk/gitea"

"code.gitea.io/gitea/models"
"code.gitea.io/gitea/modules/context"
"code.gitea.io/gitea/routers/api/v1/convert"

api "code.gitea.io/sdk/gitea"
)

// GetBranch get a branch of a repository
Expand Down
4 changes: 2 additions & 2 deletions routers/api/v1/repo/collaborators.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
package repo

import (
api "code.gitea.io/sdk/gitea"

"code.gitea.io/gitea/models"
"code.gitea.io/gitea/modules/context"

api "code.gitea.io/sdk/gitea"
)

// ListCollaborators list a repository's collaborators
Expand Down
4 changes: 2 additions & 2 deletions routers/api/v1/repo/file.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
package repo

import (
"code.gitea.io/git"

"code.gitea.io/gitea/models"
"code.gitea.io/gitea/modules/context"
"code.gitea.io/gitea/routers/repo"

"code.gitea.io/git"
)

// GetRawFile get a file by path on a repository
Expand Down
4 changes: 2 additions & 2 deletions routers/api/v1/repo/fork.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
package repo

import (
api "code.gitea.io/sdk/gitea"

"code.gitea.io/gitea/models"
"code.gitea.io/gitea/modules/context"
"code.gitea.io/gitea/routers/api/v1/utils"

api "code.gitea.io/sdk/gitea"
)

// ListForks list a repository's forks
Expand Down
4 changes: 2 additions & 2 deletions routers/api/v1/repo/hook.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
package repo

import (
api "code.gitea.io/sdk/gitea"

"code.gitea.io/gitea/models"
"code.gitea.io/gitea/modules/context"
"code.gitea.io/gitea/routers/api/v1/convert"
"code.gitea.io/gitea/routers/api/v1/utils"

api "code.gitea.io/sdk/gitea"
)

// ListHooks list all hooks of a repository
Expand Down
4 changes: 2 additions & 2 deletions routers/api/v1/repo/issue.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ import (
"fmt"
"strings"

api "code.gitea.io/sdk/gitea"

"code.gitea.io/gitea/models"
"code.gitea.io/gitea/modules/context"
"code.gitea.io/gitea/modules/indexer"
"code.gitea.io/gitea/modules/setting"
"code.gitea.io/gitea/modules/util"

api "code.gitea.io/sdk/gitea"
)

// ListIssues list the issues of a repository
Expand Down
4 changes: 2 additions & 2 deletions routers/api/v1/repo/issue_comment.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ package repo
import (
"time"

api "code.gitea.io/sdk/gitea"

"code.gitea.io/gitea/models"
"code.gitea.io/gitea/modules/context"

api "code.gitea.io/sdk/gitea"
)

// ListIssueComments list all the comments of an issue
Expand Down
4 changes: 2 additions & 2 deletions routers/api/v1/repo/issue_label.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
package repo

import (
api "code.gitea.io/sdk/gitea"

"code.gitea.io/gitea/models"
"code.gitea.io/gitea/modules/context"

api "code.gitea.io/sdk/gitea"
)

// ListIssueLabels list all the labels of an issue
Expand Down
1 change: 1 addition & 0 deletions routers/api/v1/repo/issue_tracked_time.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ package repo
import (
"code.gitea.io/gitea/models"
"code.gitea.io/gitea/modules/context"

api "code.gitea.io/sdk/gitea"
)

Expand Down
4 changes: 2 additions & 2 deletions routers/api/v1/repo/key.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ package repo
import (
"fmt"

api "code.gitea.io/sdk/gitea"

"code.gitea.io/gitea/models"
"code.gitea.io/gitea/modules/context"
"code.gitea.io/gitea/modules/setting"
"code.gitea.io/gitea/routers/api/v1/convert"

api "code.gitea.io/sdk/gitea"
)

func composeDeployKeysAPILink(repoPath string) string {
Expand Down
4 changes: 2 additions & 2 deletions routers/api/v1/repo/label.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ package repo
import (
"strconv"

api "code.gitea.io/sdk/gitea"

"code.gitea.io/gitea/models"
"code.gitea.io/gitea/modules/context"

api "code.gitea.io/sdk/gitea"
)

// ListLabels list all the labels of a repository
Expand Down
4 changes: 2 additions & 2 deletions routers/api/v1/repo/milestone.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ package repo
import (
"time"

api "code.gitea.io/sdk/gitea"

"code.gitea.io/gitea/models"
"code.gitea.io/gitea/modules/context"
"code.gitea.io/gitea/modules/util"

api "code.gitea.io/sdk/gitea"
)

// ListMilestones list all the milestones for a repository
Expand Down
4 changes: 2 additions & 2 deletions routers/api/v1/repo/release.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
package repo

import (
api "code.gitea.io/sdk/gitea"

"code.gitea.io/gitea/models"
"code.gitea.io/gitea/modules/context"

api "code.gitea.io/sdk/gitea"
)

// GetRelease get a single release of a repository
Expand Down
8 changes: 5 additions & 3 deletions routers/api/v1/repo/release_attachment.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,15 @@
package repo

import (
"errors"
"net/http"
"strings"

"code.gitea.io/gitea/models"
"code.gitea.io/gitea/modules/context"
"code.gitea.io/gitea/modules/setting"

api "code.gitea.io/sdk/gitea"
"errors"
"net/http"
"strings"
)

// GetReleaseAttachment gets a single attachment of the release
Expand Down
1 change: 1 addition & 0 deletions routers/api/v1/repo/repo.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import (
"code.gitea.io/gitea/modules/setting"
"code.gitea.io/gitea/modules/util"
"code.gitea.io/gitea/routers/api/v1/convert"

api "code.gitea.io/sdk/gitea"
)

Expand Down
4 changes: 2 additions & 2 deletions routers/api/v1/repo/star.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
package repo

import (
api "code.gitea.io/sdk/gitea"

"code.gitea.io/gitea/modules/context"

api "code.gitea.io/sdk/gitea"
)

// ListStargazers list a repository's stargazers
Expand Down
1 change: 1 addition & 0 deletions routers/api/v1/repo/status.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import (

"code.gitea.io/gitea/models"
"code.gitea.io/gitea/modules/context"

api "code.gitea.io/sdk/gitea"
)

Expand Down
4 changes: 2 additions & 2 deletions routers/api/v1/repo/subscriber.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
package repo

import (
api "code.gitea.io/sdk/gitea"

"code.gitea.io/gitea/modules/context"

api "code.gitea.io/sdk/gitea"
)

// ListSubscribers list a repo's subscribers (i.e. watchers)
Expand Down

0 comments on commit 1c5cbc3

Please sign in to comment.