refactor: refactor to adapt new custom json marshaler

This commit is contained in:
yusing
2025-04-16 14:39:26 +08:00
parent cdfc9d553b
commit c2b606e63e
43 changed files with 232 additions and 189 deletions

View File

@@ -2,9 +2,10 @@ package middleware
import (
_ "embed"
"encoding/json"
"testing"
"github.com/yusing/go-proxy/pkg/json"
"github.com/yusing/go-proxy/internal/gperr"
. "github.com/yusing/go-proxy/internal/utils/testing"
)
@@ -16,7 +17,7 @@ func TestBuild(t *testing.T) {
errs := gperr.NewBuilder("")
middlewares := BuildMiddlewaresFromYAML("", testMiddlewareCompose, errs)
ExpectNoError(t, errs.Error())
Must(json.MarshalIndent(middlewares, "", " "))
json.Marshal(middlewares)
// t.Log(string(data))
// TODO: test
}