bskyweb: update to golang v1.26 (#10208)
This commit is contained in:
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
FROM golang:1.25-bookworm AS build-env
|
FROM golang:1.26-bookworm AS build-env
|
||||||
|
|
||||||
WORKDIR /usr/src/social-app
|
WORKDIR /usr/src/social-app
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
FROM golang:1.25-bookworm AS build-env
|
FROM golang:1.26-bookworm AS build-env
|
||||||
|
|
||||||
WORKDIR /usr/src/social-app
|
WORKDIR /usr/src/social-app
|
||||||
|
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ func NewRenderer(prefix string, fs *embed.FS, debug bool) *Renderer {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (r Renderer) Render(w io.Writer, name string, data interface{}, c echo.Context) error {
|
func (r Renderer) Render(w io.Writer, name string, data any, c echo.Context) error {
|
||||||
var ctx pongo2.Context
|
var ctx pongo2.Context
|
||||||
|
|
||||||
if data != nil {
|
if data != nil {
|
||||||
|
|||||||
@@ -11,6 +11,6 @@ type Template struct {
|
|||||||
templates *template.Template
|
templates *template.Template
|
||||||
}
|
}
|
||||||
|
|
||||||
func (t *Template) Render(w io.Writer, name string, data interface{}, c echo.Context) error {
|
func (t *Template) Render(w io.Writer, name string, data any, c echo.Context) error {
|
||||||
return t.templates.ExecuteTemplate(w, name, data)
|
return t.templates.ExecuteTemplate(w, name, data)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -180,9 +180,9 @@ func serve(cctx *cli.Context) error {
|
|||||||
|
|
||||||
// Create CORS middleware for oembed
|
// Create CORS middleware for oembed
|
||||||
oembedCORS := middleware.CORSWithConfig(middleware.CORSConfig{
|
oembedCORS := middleware.CORSWithConfig(middleware.CORSConfig{
|
||||||
AllowOrigins: []string{"*"},
|
AllowOrigins: []string{"*"},
|
||||||
AllowMethods: []string{http.MethodGet, http.MethodHead, http.MethodOptions},
|
AllowMethods: []string{http.MethodGet, http.MethodHead, http.MethodOptions},
|
||||||
AllowHeaders: []string{"Origin", "Content-Type", "Accept"},
|
AllowHeaders: []string{"Origin", "Content-Type", "Accept"},
|
||||||
})
|
})
|
||||||
|
|
||||||
e.GET("/robots.txt", echo.WrapHandler(staticHandler))
|
e.GET("/robots.txt", echo.WrapHandler(staticHandler))
|
||||||
@@ -271,7 +271,7 @@ func (srv *Server) errorHandler(err error, c echo.Context) {
|
|||||||
code = he.Code
|
code = he.Code
|
||||||
}
|
}
|
||||||
c.Logger().Error(err)
|
c.Logger().Error(err)
|
||||||
data := map[string]interface{}{
|
data := map[string]any{
|
||||||
"statusCode": code,
|
"statusCode": code,
|
||||||
}
|
}
|
||||||
c.Render(code, "error.html", data)
|
c.Render(code, "error.html", data)
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
module github.com/bluesky-social/social-app/bskyweb
|
module github.com/bluesky-social/social-app/bskyweb
|
||||||
|
|
||||||
go 1.25
|
go 1.26
|
||||||
|
|
||||||
require (
|
require (
|
||||||
github.com/bluesky-social/indigo v0.0.0-20250729223159-573ae927246a
|
github.com/bluesky-social/indigo v0.0.0-20250729223159-573ae927246a
|
||||||
|
|||||||
Reference in New Issue
Block a user