Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update rk-entry version to latest one #89

Merged
merged 2 commits into from
Dec 14, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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