Replace go-chi/render with go-pkgz/rest for JSON responses and custom helpers for HTML/plain text responses. Key changes: - Replace render.JSON/render.Status with rest.RenderJSON and explicit w.WriteHeader() calls - Replace render.DecodeJSON with json.NewDecoder().Decode() - Add SendErrorJSON helper that sets Content-Type header before WriteHeader (required since rest.RenderJSON can't set headers after WriteHeader is called) - Add HTMLResponse and PlainTextResponse helpers Fix export double-execution in migrator.go: The original code called Export twice - once to io.Discard to check for errors, then again to actually write. This was wasteful and had a race condition risk. Now file mode buffers to memory first for atomic success/failure, while stream mode writes directly with proper error handling.
76 lines
2.9 KiB
AMPL
76 lines
2.9 KiB
AMPL
module github.com/umputun/remark42/backend
|
|
|
|
go 1.25
|
|
|
|
require (
|
|
github.com/Depado/bfchroma/v2 v2.0.0
|
|
github.com/PuerkitoBio/goquery v1.10.2
|
|
github.com/alecthomas/chroma/v2 v2.15.0
|
|
github.com/didip/tollbooth/v7 v7.0.2
|
|
github.com/didip/tollbooth_chi v0.0.0-20220719025231-d662a7f6928f
|
|
github.com/go-chi/chi/v5 v5.2.1
|
|
github.com/go-chi/cors v1.2.1
|
|
github.com/go-pkgz/auth/v2 v2.0.1-0.20250415030422-4f9f2c5e3b0d
|
|
github.com/go-pkgz/jrpc v0.3.1
|
|
github.com/go-pkgz/lcw/v2 v2.0.0
|
|
github.com/go-pkgz/lgr v0.12.0
|
|
github.com/go-pkgz/notify v1.2.0
|
|
github.com/go-pkgz/repeater v1.2.0
|
|
github.com/go-pkgz/rest v1.20.3
|
|
github.com/go-pkgz/syncs v1.3.2
|
|
github.com/golang-jwt/jwt/v5 v5.2.2
|
|
github.com/google/uuid v1.6.0
|
|
github.com/gorilla/feeds v1.2.0
|
|
github.com/hashicorp/go-multierror v1.1.1
|
|
github.com/jessevdk/go-flags v1.6.1
|
|
github.com/kyokomi/emoji/v2 v2.2.13
|
|
github.com/microcosm-cc/bluemonday v1.0.27
|
|
github.com/rs/xid v1.6.0
|
|
github.com/russross/blackfriday/v2 v2.1.0
|
|
github.com/skip2/go-qrcode v0.0.0-20200617195104-da1b6568686e
|
|
github.com/stretchr/testify v1.10.0
|
|
go.etcd.io/bbolt v1.4.0
|
|
go.uber.org/goleak v1.3.0
|
|
golang.org/x/crypto v0.37.0
|
|
golang.org/x/image v0.26.0
|
|
golang.org/x/net v0.39.0
|
|
)
|
|
|
|
require (
|
|
cloud.google.com/go/compute/metadata v0.6.0 // indirect
|
|
github.com/ajg/form v1.5.1 // indirect
|
|
github.com/andybalholm/cascadia v1.3.3 // indirect
|
|
github.com/aymerick/douceur v0.2.0 // indirect
|
|
github.com/cespare/xxhash/v2 v2.3.0 // indirect
|
|
github.com/davecgh/go-spew v1.1.1 // indirect
|
|
github.com/dghubble/oauth1 v0.7.3 // indirect
|
|
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f // indirect
|
|
github.com/didip/tollbooth/v8 v8.0.1 // indirect
|
|
github.com/dlclark/regexp2 v1.11.4 // indirect
|
|
github.com/go-chi/render v1.0.3 // indirect
|
|
github.com/go-oauth2/oauth2/v4 v4.5.3 // indirect
|
|
github.com/go-pkgz/email v0.5.0 // indirect
|
|
github.com/go-pkgz/expirable-cache/v3 v3.0.0 // indirect
|
|
github.com/golang/snappy v1.0.0 // indirect
|
|
github.com/gorilla/css v1.0.1 // indirect
|
|
github.com/gorilla/websocket v1.5.3 // indirect
|
|
github.com/hashicorp/errwrap v1.1.0 // indirect
|
|
github.com/hashicorp/golang-lru/v2 v2.0.7 // indirect
|
|
github.com/klauspost/compress v1.18.0 // indirect
|
|
github.com/montanaflynn/stats v0.7.1 // indirect
|
|
github.com/pmezard/go-difflib v1.0.0 // indirect
|
|
github.com/redis/go-redis/v9 v9.7.3 // indirect
|
|
github.com/rrivera/identicon v0.0.0-20240116195454-d5ba35832c0d // indirect
|
|
github.com/slack-go/slack v0.15.0 // indirect
|
|
github.com/xdg-go/pbkdf2 v1.0.0 // indirect
|
|
github.com/xdg-go/scram v1.1.2 // indirect
|
|
github.com/xdg-go/stringprep v1.0.4 // indirect
|
|
github.com/youmark/pkcs8 v0.0.0-20240726163527-a2c0da244d78 // indirect
|
|
go.mongodb.org/mongo-driver v1.17.3 // indirect
|
|
golang.org/x/oauth2 v0.29.0 // indirect
|
|
golang.org/x/sync v0.13.0 // indirect
|
|
golang.org/x/sys v0.32.0 // indirect
|
|
golang.org/x/text v0.24.0 // indirect
|
|
gopkg.in/yaml.v3 v3.0.1 // indirect
|
|
)
|