Apply compat patch

This commit is contained in:
yusing
2026-02-28 19:37:38 +08:00
parent 5f48f141ca
commit 27dc13a9a8
66 changed files with 418 additions and 739 deletions

View File

@@ -1,10 +1,10 @@
package route
import (
"encoding/json"
"errors"
"strconv"
"github.com/bytedance/sonic"
gperr "github.com/yusing/goutils/errs"
)
@@ -59,7 +59,7 @@ func (s Scheme) MarshalJSON() ([]byte, error) {
func (s *Scheme) UnmarshalJSON(data []byte) error {
var v string
if err := sonic.Unmarshal(data, &v); err != nil {
if err := json.Unmarshal(data, &v); err != nil {
return err
}
return s.Parse(v)