Skip to content

Commit

Permalink
fix: r.GetString(xxx) -> r.Get(xxx).String()
Browse files Browse the repository at this point in the history
  • Loading branch information
gqcn committed Dec 25, 2024
1 parent f5b7f5c commit 9f446da
Show file tree
Hide file tree
Showing 11 changed files with 11 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ func main() {
s := g.Server()
s.Group("/", func(group *ghttp.RouterGroup) {
group.Middleware(func(r *ghttp.Request) {
r.SetCtx(gi18n.WithLanguage(r.Context(), r.GetString("lang", "zh-CN")))
r.SetCtx(gi18n.WithLanguage(r.Context(), r.Get("lang", "zh-CN").String()))
r.Middleware.Next()
})
group.ALL("/", func(r *ghttp.Request) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ func main() {
s := g.Server()
s.Group("/", func(group *ghttp.RouterGroup) {
group.Middleware(func(r *ghttp.Request) {
r.SetCtx(gi18n.WithLanguage(r.Context(), r.GetString("lang", "zh-CN")))
r.SetCtx(gi18n.WithLanguage(r.Context(), r.Get("lang", "zh-CN").String()))
r.Middleware.Next()
})
group.ALL("/", func(r *ghttp.Request) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ func main() {
s := g.Server()
s.Group("/", func(group *ghttp.RouterGroup) {
group.Middleware(func(r *ghttp.Request) {
r.SetCtx(gi18n.WithLanguage(r.Context(), r.GetString("lang", "zh-CN")))
r.SetCtx(gi18n.WithLanguage(r.Context(), r.Get("lang", "zh-CN").String()))
r.Middleware.Next()
})
group.ALL("/", func(r *ghttp.Request) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ func main() {
s := g.Server()
s.Group("/", func(group *ghttp.RouterGroup) {
group.Middleware(func(r *ghttp.Request) {
r.SetCtx(gi18n.WithLanguage(r.Context(), r.GetString("lang", "zh-CN")))
r.SetCtx(gi18n.WithLanguage(r.Context(), r.Get("lang", "zh-CN").String()))
r.Middleware.Next()
})
group.ALL("/", func(r *ghttp.Request) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ func main() {
s := g.Server()
s.Group("/", func(group *ghttp.RouterGroup) {
group.Middleware(func(r *ghttp.Request) {
r.SetCtx(gi18n.WithLanguage(r.Context(), r.GetString("lang", "zh-CN")))
r.SetCtx(gi18n.WithLanguage(r.Context(), r.Get("lang", "zh-CN").String()))
r.Middleware.Next()
})
group.ALL("/", func(r *ghttp.Request) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ func main() {
s := g.Server()
s.Group("/", func(group *ghttp.RouterGroup) {
group.Middleware(func(r *ghttp.Request) {
r.SetCtx(gi18n.WithLanguage(r.Context(), r.GetString("lang", "zh-CN")))
r.SetCtx(gi18n.WithLanguage(r.Context(), r.Get("lang", "zh-CN").String()))
r.Middleware.Next()
})
group.ALL("/", func(r *ghttp.Request) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ func main() {
s := g.Server()
s.Group("/", func(group *ghttp.RouterGroup) {
group.Middleware(func(r *ghttp.Request) {
r.SetCtx(gi18n.WithLanguage(r.Context(), r.GetString("lang", "zh-CN")))
r.SetCtx(gi18n.WithLanguage(r.Context(), r.Get("lang", "zh-CN").String()))
r.Middleware.Next()
})
group.ALL("/", func(r *ghttp.Request) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ func main() {
s := g.Server()
s.Group("/", func(group *ghttp.RouterGroup) {
group.Middleware(func(r *ghttp.Request) {
r.SetCtx(gi18n.WithLanguage(r.Context(), r.GetString("lang", "zh-CN")))
r.SetCtx(gi18n.WithLanguage(r.Context(), r.Get("lang", "zh-CN").String()))
r.Middleware.Next()
})
group.ALL("/", func(r *ghttp.Request) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ func main() {
s := g.Server()
s.Group("/", func(group *ghttp.RouterGroup) {
group.Middleware(func(r *ghttp.Request) {
r.SetCtx(gi18n.WithLanguage(r.Context(), r.GetString("lang", "zh-CN")))
r.SetCtx(gi18n.WithLanguage(r.Context(), r.Get("lang", "zh-CN").String()))
r.Middleware.Next()
})
group.ALL("/", func(r *ghttp.Request) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ func main() {
s := g.Server()
s.Group("/", func(group *ghttp.RouterGroup) {
group.Middleware(func(r *ghttp.Request) {
r.SetCtx(gi18n.WithLanguage(r.Context(), r.GetString("lang", "zh-CN")))
r.SetCtx(gi18n.WithLanguage(r.Context(), r.Get("lang", "zh-CN").String()))
r.Middleware.Next()
})
group.ALL("/", func(r *ghttp.Request) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ func main() {
s := g.Server()
s.Group("/", func(group *ghttp.RouterGroup) {
group.Middleware(func(r *ghttp.Request) {
r.SetCtx(gi18n.WithLanguage(r.Context(), r.GetString("lang", "zh-CN")))
r.SetCtx(gi18n.WithLanguage(r.Context(), r.Get("lang", "zh-CN").String()))
r.Middleware.Next()
})
group.ALL("/", func(r *ghttp.Request) {
Expand Down

0 comments on commit 9f446da

Please sign in to comment.