Apply compat patch

This commit is contained in:
yusing
2026-03-10 15:01:07 +08:00
parent 291fe67c31
commit 0bd134cf47
59 changed files with 261 additions and 266 deletions

View File

@@ -2,6 +2,7 @@ package proxmox
import (
"context"
"encoding/json"
"errors"
"fmt"
"net"
@@ -12,7 +13,6 @@ import (
"strings"
"sync"
"github.com/bytedance/sonic"
"github.com/luthermonson/go-proxmox"
"golang.org/x/sync/errgroup"
)
@@ -203,7 +203,7 @@ func (c *Client) Name() string {
}
func (c *Client) MarshalJSON() ([]byte, error) {
return sonic.Marshal(map[string]any{
return json.Marshal(map[string]any{
"version": c.Version,
"cluster": map[string]any{
"name": c.Cluster.Name,

View File

@@ -2,10 +2,10 @@ package proxmox
import (
"context"
"encoding/json"
"fmt"
"strings"
"github.com/bytedance/sonic"
gperr "github.com/yusing/goutils/errs"
"github.com/yusing/goutils/pool"
)
@@ -82,7 +82,7 @@ func (n *Node) String() string {
}
func (n *Node) MarshalJSON() ([]byte, error) {
return sonic.Marshal(map[string]any{
return json.Marshal(map[string]any{
"name": n.name,
"id": n.id,
})