Skip to content

Commit

Permalink
enhance: consistent import order
Browse files Browse the repository at this point in the history
  • Loading branch information
wass3r committed Mar 6, 2024
1 parent 4a26eb4 commit 8d9ddec
Show file tree
Hide file tree
Showing 508 changed files with 894 additions and 564 deletions.
7 changes: 3 additions & 4 deletions api/admin/build.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,12 @@ import (
"strconv"
"time"

"github.com/gin-gonic/gin"
"github.com/sirupsen/logrus"

"github.com/go-vela/server/database"
"github.com/go-vela/server/util"

"github.com/go-vela/types/library"

"github.com/gin-gonic/gin"
"github.com/sirupsen/logrus"
)

// swagger:operation GET /api/v1/admin/builds/queue admin AllBuildsQueue
Expand Down
6 changes: 3 additions & 3 deletions api/admin/clean.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ import (
"strconv"
"time"

"github.com/gin-gonic/gin"
"github.com/sirupsen/logrus"

"github.com/go-vela/server/database"
"github.com/go-vela/server/router/middleware/user"
"github.com/go-vela/server/util"
"github.com/go-vela/types"
"github.com/go-vela/types/constants"

"github.com/gin-gonic/gin"
"github.com/sirupsen/logrus"
)

// swagger:operation PUT /api/v1/admin/clean admin AdminCleanResources
Expand Down
3 changes: 2 additions & 1 deletion api/admin/hook.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,11 @@ import (
"net/http"

"github.com/gin-gonic/gin"
"github.com/sirupsen/logrus"

"github.com/go-vela/server/database"
"github.com/go-vela/server/util"
"github.com/go-vela/types/library"
"github.com/sirupsen/logrus"
)

// swagger:operation PUT /api/v1/admin/hook admin AdminUpdateHook
Expand Down
7 changes: 3 additions & 4 deletions api/admin/repo.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,12 @@ import (
"fmt"
"net/http"

"github.com/gin-gonic/gin"
"github.com/sirupsen/logrus"

"github.com/go-vela/server/database"
"github.com/go-vela/server/util"

"github.com/go-vela/types/library"

"github.com/gin-gonic/gin"
"github.com/sirupsen/logrus"
)

// swagger:operation PUT /api/v1/admin/repo admin AdminUpdateRepo
Expand Down
7 changes: 3 additions & 4 deletions api/admin/secret.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,12 @@ import (
"fmt"
"net/http"

"github.com/gin-gonic/gin"
"github.com/sirupsen/logrus"

"github.com/go-vela/server/database"
"github.com/go-vela/server/util"

"github.com/go-vela/types/library"

"github.com/gin-gonic/gin"
"github.com/sirupsen/logrus"
)

// swagger:operation PUT /api/v1/admin/secret admin AdminUpdateSecret
Expand Down
7 changes: 3 additions & 4 deletions api/admin/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,12 @@ import (
"fmt"
"net/http"

"github.com/gin-gonic/gin"
"github.com/sirupsen/logrus"

"github.com/go-vela/server/database"
"github.com/go-vela/server/util"

"github.com/go-vela/types/library"

"github.com/gin-gonic/gin"
"github.com/sirupsen/logrus"
)

// swagger:operation PUT /api/v1/admin/service admin AdminUpdateService
Expand Down
7 changes: 3 additions & 4 deletions api/admin/step.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,12 @@ import (
"fmt"
"net/http"

"github.com/gin-gonic/gin"
"github.com/sirupsen/logrus"

"github.com/go-vela/server/database"
"github.com/go-vela/server/util"

"github.com/go-vela/types/library"

"github.com/gin-gonic/gin"
"github.com/sirupsen/logrus"
)

// swagger:operation PUT /api/v1/admin/step admin AdminUpdateStep
Expand Down
7 changes: 3 additions & 4 deletions api/admin/user.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,12 @@ import (
"fmt"
"net/http"

"github.com/gin-gonic/gin"
"github.com/sirupsen/logrus"

"github.com/go-vela/server/database"
"github.com/go-vela/server/util"

"github.com/go-vela/types/library"

"github.com/gin-gonic/gin"
"github.com/sirupsen/logrus"
)

// swagger:operation PUT /api/v1/admin/user admin AdminUpdateUser
Expand Down
6 changes: 3 additions & 3 deletions api/admin/worker.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ import (
"fmt"
"net/http"

"github.com/gin-gonic/gin"
"github.com/sirupsen/logrus"

"github.com/go-vela/server/internal/token"
"github.com/go-vela/server/router/middleware/user"
"github.com/go-vela/server/util"
"github.com/go-vela/types/constants"
"github.com/go-vela/types/library"

"github.com/gin-gonic/gin"
"github.com/sirupsen/logrus"
)

// swagger:operation POST /api/v1/admin/workers/{worker}/register-token admin RegisterToken
Expand Down
1 change: 1 addition & 0 deletions api/auth/get_token.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import (
"net/http"

"github.com/gin-gonic/gin"

"github.com/go-vela/server/database"
"github.com/go-vela/server/internal/token"
"github.com/go-vela/server/scm"
Expand Down
3 changes: 2 additions & 1 deletion api/auth/login.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,10 @@ import (
"net/url"

"github.com/gin-gonic/gin"
"github.com/sirupsen/logrus"

"github.com/go-vela/server/util"
"github.com/go-vela/types"
"github.com/sirupsen/logrus"
)

// swagger:operation GET /login authenticate GetLogin
Expand Down
7 changes: 3 additions & 4 deletions api/auth/logout.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,14 @@ import (
"net/http"
"net/url"

"github.com/gin-gonic/gin"
"github.com/sirupsen/logrus"

"github.com/go-vela/server/database"
"github.com/go-vela/server/router/middleware/user"
"github.com/go-vela/server/util"

"github.com/go-vela/types"
"github.com/go-vela/types/constants"

"github.com/gin-gonic/gin"
"github.com/sirupsen/logrus"
)

// swagger:operation GET /logout authenticate GetLogout
Expand Down
1 change: 1 addition & 0 deletions api/auth/post_token.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import (
"net/http"

"github.com/gin-gonic/gin"

"github.com/go-vela/server/database"
"github.com/go-vela/server/internal/token"
"github.com/go-vela/server/scm"
Expand Down
3 changes: 2 additions & 1 deletion api/auth/redirect.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,10 @@ import (
"net/http"

"github.com/gin-gonic/gin"
"github.com/sirupsen/logrus"

"github.com/go-vela/server/util"
"github.com/go-vela/types"
"github.com/sirupsen/logrus"
)

// swagger:operation GET /authenticate/web authenticate GetAuthenticateTypeWeb
Expand Down
1 change: 1 addition & 0 deletions api/auth/refresh.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import (
"net/http"

"github.com/gin-gonic/gin"

"github.com/go-vela/server/internal/token"
"github.com/go-vela/server/router/middleware/auth"
"github.com/go-vela/server/util"
Expand Down
1 change: 1 addition & 0 deletions api/auth/validate.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import (
"strings"

"github.com/gin-gonic/gin"

"github.com/go-vela/server/router/middleware/claims"
"github.com/go-vela/server/util"
)
Expand Down
1 change: 1 addition & 0 deletions api/auth/validate_oauth.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import (
"net/http"

"github.com/gin-gonic/gin"

"github.com/go-vela/server/scm"
"github.com/go-vela/server/util"
)
Expand Down
3 changes: 2 additions & 1 deletion api/badge.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,13 @@ import (
"net/http"

"github.com/gin-gonic/gin"
"github.com/sirupsen/logrus"

"github.com/go-vela/server/database"
"github.com/go-vela/server/router/middleware/org"
"github.com/go-vela/server/router/middleware/repo"
"github.com/go-vela/server/util"
"github.com/go-vela/types/constants"
"github.com/sirupsen/logrus"
)

// swagger:operation GET /badge/{org}/{repo}/status.svg base GetBadge
Expand Down
3 changes: 2 additions & 1 deletion api/build/approve.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ import (
"time"

"github.com/gin-gonic/gin"
"github.com/sirupsen/logrus"

"github.com/go-vela/server/database"
"github.com/go-vela/server/queue"
"github.com/go-vela/server/router/middleware/build"
Expand All @@ -17,7 +19,6 @@ import (
"github.com/go-vela/server/router/middleware/user"
"github.com/go-vela/server/util"
"github.com/go-vela/types/constants"
"github.com/sirupsen/logrus"
)

// swagger:operation POST /api/v1/repos/{org}/{repo}/builds/{build}/approve builds ApproveBuild
Expand Down
1 change: 1 addition & 0 deletions api/build/auto_cancel.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import (
"time"

"github.com/gin-gonic/gin"

"github.com/go-vela/server/database"
"github.com/go-vela/server/internal/token"
"github.com/go-vela/types/constants"
Expand Down
3 changes: 2 additions & 1 deletion api/build/cancel.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ import (
"time"

"github.com/gin-gonic/gin"
"github.com/sirupsen/logrus"

"github.com/go-vela/server/database"
"github.com/go-vela/server/internal/token"
"github.com/go-vela/server/router/middleware/build"
Expand All @@ -21,7 +23,6 @@ import (
"github.com/go-vela/server/router/middleware/user"
"github.com/go-vela/server/util"
"github.com/go-vela/types/constants"
"github.com/sirupsen/logrus"
)

// swagger:operation DELETE /api/v1/repos/{org}/{repo}/builds/{build}/cancel builds CancelBuild
Expand Down
3 changes: 2 additions & 1 deletion api/build/clean.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,11 @@ import (
"fmt"
"time"

"github.com/sirupsen/logrus"

"github.com/go-vela/server/database"
"github.com/go-vela/types/constants"
"github.com/go-vela/types/library"
"github.com/sirupsen/logrus"
)

// cleanBuild is a helper function to kill the build
Expand Down
3 changes: 2 additions & 1 deletion api/build/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ import (
"time"

"github.com/gin-gonic/gin"
"github.com/sirupsen/logrus"

"github.com/go-vela/server/compiler"
"github.com/go-vela/server/database"
"github.com/go-vela/server/queue"
Expand All @@ -22,7 +24,6 @@ import (
"github.com/go-vela/types/constants"
"github.com/go-vela/types/library"
"github.com/go-vela/types/pipeline"
"github.com/sirupsen/logrus"
)

// swagger:operation POST /api/v1/repos/{org}/{repo}/builds builds CreateBuild
Expand Down
3 changes: 2 additions & 1 deletion api/build/delete.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,14 @@ import (
"net/http"

"github.com/gin-gonic/gin"
"github.com/sirupsen/logrus"

"github.com/go-vela/server/database"
"github.com/go-vela/server/router/middleware/build"
"github.com/go-vela/server/router/middleware/org"
"github.com/go-vela/server/router/middleware/repo"
"github.com/go-vela/server/router/middleware/user"
"github.com/go-vela/server/util"
"github.com/sirupsen/logrus"
)

// swagger:operation DELETE /api/v1/repos/{org}/{repo}/builds/{build} builds DeleteBuild
Expand Down
3 changes: 2 additions & 1 deletion api/build/executable.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ import (
"net/http"

"github.com/gin-gonic/gin"
"github.com/sirupsen/logrus"

"github.com/go-vela/server/database"
"github.com/go-vela/server/router/middleware/build"
"github.com/go-vela/server/router/middleware/claims"
Expand All @@ -17,7 +19,6 @@ import (
"github.com/go-vela/server/util"
"github.com/go-vela/types/library"
"github.com/go-vela/types/pipeline"
"github.com/sirupsen/logrus"
)

// swagger:operation GET /api/v1/repos/{org}/{repo}/builds/{build}/executable builds GetBuildExecutable
Expand Down
3 changes: 2 additions & 1 deletion api/build/get.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,12 @@ import (
"net/http"

"github.com/gin-gonic/gin"
"github.com/sirupsen/logrus"

"github.com/go-vela/server/router/middleware/build"
"github.com/go-vela/server/router/middleware/org"
"github.com/go-vela/server/router/middleware/repo"
"github.com/go-vela/server/router/middleware/user"
"github.com/sirupsen/logrus"
)

// swagger:operation GET /api/v1/repos/{org}/{repo}/builds/{build} builds GetBuild
Expand Down
3 changes: 2 additions & 1 deletion api/build/get_id.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,13 @@ import (
"strconv"

"github.com/gin-gonic/gin"
"github.com/sirupsen/logrus"

"github.com/go-vela/server/database"
"github.com/go-vela/server/router/middleware/user"
"github.com/go-vela/server/scm"
"github.com/go-vela/server/util"
"github.com/go-vela/types/library"
"github.com/sirupsen/logrus"
)

// swagger:operation GET /api/v1/search/builds/{id} builds GetBuildByID
Expand Down
3 changes: 2 additions & 1 deletion api/build/graph.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ import (
"strings"

"github.com/gin-gonic/gin"
"github.com/sirupsen/logrus"

"github.com/go-vela/server/compiler"
"github.com/go-vela/server/database"
"github.com/go-vela/server/router/middleware/build"
Expand All @@ -21,7 +23,6 @@ import (
"github.com/go-vela/types/constants"
"github.com/go-vela/types/library"
"github.com/go-vela/types/pipeline"
"github.com/sirupsen/logrus"
)

// Graph contains nodes, and relationships between nodes, or edges.
Expand Down
Loading

0 comments on commit 8d9ddec

Please sign in to comment.