use another lib for json

This commit is contained in:
Laptop 2024-12-21 20:43:41 +02:00
parent de96639061
commit 5aa6bdf354
9 changed files with 12 additions and 12 deletions

3
go.mod
View file

@ -8,8 +8,8 @@ require (
github.com/dlclark/regexp2 v1.11.5-0.20240806004527-5bbbed8ea10b
github.com/gcottom/mp4meta v0.0.4
github.com/gcottom/oggmeta v0.0.7
github.com/goccy/go-json v0.10.4
github.com/gofiber/fiber/v2 v2.52.5
github.com/segmentio/encoding v0.4.1
github.com/valyala/fasthttp v1.58.0
)
@ -23,7 +23,6 @@ require (
github.com/mattn/go-isatty v0.0.20 // indirect
github.com/mattn/go-runewidth v0.0.16 // indirect
github.com/rivo/uniseg v0.4.7 // indirect
github.com/segmentio/asm v1.2.0 // indirect
github.com/sunfish-shogi/bufseekio v0.1.0 // indirect
github.com/valyala/bytebufferpool v1.0.0 // indirect
github.com/valyala/tcplisten v1.0.0 // indirect

6
go.sum
View file

@ -18,6 +18,8 @@ github.com/gcottom/mp4meta v0.0.4 h1:oHdl5Ad0A0PQCTxthD0KFEQG7pUxG8oOLmTWmgnbncQ
github.com/gcottom/mp4meta v0.0.4/go.mod h1:qstBsqczbFF1e90C828qv966Xjx/LFPjWQITARCpyfA=
github.com/gcottom/oggmeta v0.0.7 h1:6mKm/9xhDeKKIOrB0K+daJoXOLbyRq84e5xV3dndDt8=
github.com/gcottom/oggmeta v0.0.7/go.mod h1:ifdINhphaEW587BIgA+m5TJwCoVk88JuZMCHwXc/gpM=
github.com/goccy/go-json v0.10.4 h1:JSwxQzIqKfmFX1swYPpUThQZp/Ka4wzJdK0LWVytLPM=
github.com/goccy/go-json v0.10.4/go.mod h1:oq7eo15ShAhp70Anwd5lgX2pLfOS3QCiwU/PULtXL6M=
github.com/gofiber/fiber/v2 v2.52.5 h1:tWoP1MJQjGEe4GB5TUGOi7P2E0ZMMRx5ZTG4rT+yGMo=
github.com/gofiber/fiber/v2 v2.52.5/go.mod h1:KEOE+cXMhXG0zHc9d8+E38hoX+ZN7bhOtgeF2oT6jrQ=
github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI=
@ -45,10 +47,6 @@ github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZN
github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc=
github.com/rivo/uniseg v0.4.7 h1:WUdvkW8uEhrYfLC4ZzdpI2ztxP1I582+49Oc5Mq64VQ=
github.com/rivo/uniseg v0.4.7/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88=
github.com/segmentio/asm v1.2.0 h1:9BQrFxC+YOHJlTlHGkTrFWf59nbL3XnCoFLTwDCI7ys=
github.com/segmentio/asm v1.2.0/go.mod h1:BqMnlJP91P8d+4ibuonYZw9mfnzI9HfxselHZr5aAcs=
github.com/segmentio/encoding v0.4.1 h1:KLGaLSW0jrmhB58Nn4+98spfvPvmo4Ci1P/WIQ9wn7w=
github.com/segmentio/encoding v0.4.1/go.mod h1:/d03Cd8PoaDeceuhUUUQWjU0KhWjrmYrWPgtJHYZSnI=
github.com/stretchr/objx v0.1.0 h1:4G4v2dO3VZwixGIRoQ5Lfboy6nUhCyYzaqnIAPPhYs4=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=

View file

@ -10,7 +10,7 @@ import (
"sync"
"time"
"github.com/segmentio/encoding/json"
"github.com/goccy/go-json"
"github.com/valyala/fasthttp"
)

View file

@ -2,9 +2,10 @@ package preferences
import (
"context"
"encoding/json"
"time"
"github.com/goccy/go-json"
"github.com/gofiber/fiber/v2"
"github.com/maid-zone/soundcloak/lib/cfg"
"github.com/maid-zone/soundcloak/templates"

View file

@ -73,6 +73,8 @@ func (r *reader) Setup(url string, aac bool) error {
if r.parts == nil {
cfg.Log("make() r.parts")
r.parts = make([][]byte, 0, 16)
} else {
cfg.Log(cap(r.parts), len(r.parts))
}
if aac {
// clone needed to mitigate memory skill issues here

View file

@ -10,8 +10,8 @@ import (
"time"
"github.com/dlclark/regexp2"
"github.com/goccy/go-json"
"github.com/maid-zone/soundcloak/lib/cfg"
"github.com/segmentio/encoding/json"
"github.com/valyala/fasthttp"
)

View file

@ -9,8 +9,8 @@ import (
"sync"
"time"
"github.com/goccy/go-json"
"github.com/maid-zone/soundcloak/lib/cfg"
"github.com/segmentio/encoding/json"
"github.com/valyala/fasthttp"
)

View file

@ -8,9 +8,9 @@ import (
"sync"
"time"
"github.com/goccy/go-json"
"github.com/maid-zone/soundcloak/lib/cfg"
"github.com/maid-zone/soundcloak/lib/textparsing"
"github.com/segmentio/encoding/json"
"github.com/valyala/fasthttp"
)

View file

@ -10,8 +10,8 @@ import (
"github.com/gofiber/fiber/v2"
"github.com/gofiber/fiber/v2/middleware/compress"
"github.com/goccy/go-json"
"github.com/gofiber/fiber/v2/middleware/recover"
"github.com/segmentio/encoding/json"
"github.com/valyala/fasthttp"
"github.com/maid-zone/soundcloak/lib/cfg"