Add with_std_json build tag

This commit is contained in:
世界
2022-07-24 21:22:19 +08:00
parent fe8e984608
commit 67edc163cb
17 changed files with 55 additions and 25 deletions
+1 -2
View File
@@ -4,10 +4,9 @@ import (
"bytes"
"strings"
"github.com/sagernet/sing-box/common/json"
"github.com/sagernet/sing/common"
E "github.com/sagernet/sing/common/exceptions"
"github.com/goccy/go-json"
)
type _Options struct {
+1 -2
View File
@@ -1,11 +1,10 @@
package option
import (
"github.com/sagernet/sing-box/common/json"
C "github.com/sagernet/sing-box/constant"
"github.com/sagernet/sing/common"
E "github.com/sagernet/sing/common/exceptions"
"github.com/goccy/go-json"
)
type DNSOptions struct {
+1 -2
View File
@@ -1,12 +1,11 @@
package option
import (
"github.com/sagernet/sing-box/common/json"
C "github.com/sagernet/sing-box/constant"
"github.com/sagernet/sing/common"
"github.com/sagernet/sing/common/auth"
E "github.com/sagernet/sing/common/exceptions"
"github.com/goccy/go-json"
)
type _Inbound struct {
+1 -2
View File
@@ -4,10 +4,9 @@ import (
"bytes"
"github.com/sagernet/sing-box/common/badjson"
"github.com/sagernet/sing-box/common/json"
"github.com/sagernet/sing/common"
E "github.com/sagernet/sing/common/exceptions"
"github.com/goccy/go-json"
)
func ToMap(v any) (*badjson.JSONObject, error) {
+1 -2
View File
@@ -1,12 +1,11 @@
package option
import (
"github.com/sagernet/sing-box/common/json"
C "github.com/sagernet/sing-box/constant"
"github.com/sagernet/sing/common"
E "github.com/sagernet/sing/common/exceptions"
M "github.com/sagernet/sing/common/metadata"
"github.com/goccy/go-json"
)
type _Outbound struct {
+1 -2
View File
@@ -1,11 +1,10 @@
package option
import (
"github.com/sagernet/sing-box/common/json"
C "github.com/sagernet/sing-box/constant"
"github.com/sagernet/sing/common"
E "github.com/sagernet/sing/common/exceptions"
"github.com/goccy/go-json"
)
type RouteOptions struct {
+1 -2
View File
@@ -5,11 +5,10 @@ import (
"strings"
"time"
"github.com/sagernet/sing-box/common/json"
C "github.com/sagernet/sing-box/constant"
"github.com/sagernet/sing-dns"
E "github.com/sagernet/sing/common/exceptions"
"github.com/goccy/go-json"
)
type ListenAddress netip.Addr