Skip to content

Commit

Permalink
Merge pull request #89 from dongxuny/master
Browse files Browse the repository at this point in the history
Update rk-entry version to latest one
  • Loading branch information
dongxuny committed Dec 14, 2022
2 parents 8764188 + 7e3eecd commit 7449f6f
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 390 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@v2
with:
go-version: 1.17
go-version: 1.18
- name: Run test coverage
run: go test $(go list ./... | grep -v example | grep -v pkged.go) -coverprofile=coverage.txt -covermode=atomic
- name: Upload coverage to Codecov
Expand Down
8 changes: 4 additions & 4 deletions boot/gin_entry.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ import (
"github.com/rookie-ninja/rk-query"
"go.uber.org/zap"
"net/http"
"path/filepath"
"path"
"strconv"
"strings"
"sync"
Expand Down Expand Up @@ -384,19 +384,19 @@ func (entry *GinEntry) Bootstrap(ctx context.Context) {

// Is swagger enabled?
if entry.IsSwEnabled() {
entry.Router.GET(filepath.Join(entry.SwEntry.Path, "*any"), gin.WrapF(entry.SwEntry.ConfigFileHandler()))
entry.Router.GET(path.Join(entry.SwEntry.Path, "*any"), gin.WrapF(entry.SwEntry.ConfigFileHandler()))
entry.SwEntry.Bootstrap(ctx)
}

// Is docs enabled?
if entry.IsDocsEnabled() {
entry.Router.GET(filepath.Join(entry.DocsEntry.Path, "*any"), gin.WrapF(entry.DocsEntry.ConfigFileHandler()))
entry.Router.GET(path.Join(entry.DocsEntry.Path, "*any"), gin.WrapF(entry.DocsEntry.ConfigFileHandler()))
entry.DocsEntry.Bootstrap(ctx)
}

// Is static file handler enabled?
if entry.IsStaticFileHandlerEnabled() {
entry.Router.GET(filepath.Join(entry.StaticFileEntry.Path, "*any"), gin.WrapF(entry.StaticFileEntry.GetFileHandler()))
entry.Router.GET(path.Join(entry.StaticFileEntry.Path, "*any"), gin.WrapF(entry.StaticFileEntry.GetFileHandler()))
entry.StaticFileEntry.Bootstrap(ctx)
}

Expand Down
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
module github.com/rookie-ninja/rk-gin/v2

go 1.17
go 1.18

require (
github.com/gin-contrib/pprof v1.3.0
github.com/gin-gonic/gin v1.8.1
github.com/golang-jwt/jwt/v4 v4.4.2
github.com/prometheus/client_golang v1.13.0
github.com/rookie-ninja/rk-entry/v2 v2.2.11
github.com/rookie-ninja/rk-entry/v2 v2.2.13
github.com/rookie-ninja/rk-logger v1.2.12
github.com/rookie-ninja/rk-query v1.2.14
github.com/rs/xid v1.3.0
Expand Down
Loading

0 comments on commit 7449f6f

Please sign in to comment.