mirror of
https://github.com/juanfont/headscale.git
synced 2025-08-10 13:46:46 +02:00
replace encoding/json with faster go-json
This commit is contained in:
parent
93afb03f67
commit
327b8f5239
@ -1,7 +1,7 @@
|
||||
package cli
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"github.com/goccy/go-json"
|
||||
"fmt"
|
||||
"net"
|
||||
"net/http"
|
||||
|
@ -3,7 +3,7 @@ package cli
|
||||
import (
|
||||
"context"
|
||||
"crypto/tls"
|
||||
"encoding/json"
|
||||
"github.com/goccy/go-json"
|
||||
"fmt"
|
||||
"os"
|
||||
|
||||
|
1
go.mod
1
go.mod
@ -127,6 +127,7 @@ require (
|
||||
github.com/go-json-experiment/json v0.0.0-20250103232110-6a9a0fde9288 // indirect
|
||||
github.com/go-ole/go-ole v1.3.0 // indirect
|
||||
github.com/go-viper/mapstructure/v2 v2.2.1 // indirect
|
||||
github.com/goccy/go-json v0.10.5 // indirect
|
||||
github.com/godbus/dbus/v5 v5.1.1-0.20230522191255-76236955d466 // indirect
|
||||
github.com/gogo/protobuf v1.3.2 // indirect
|
||||
github.com/golang-jwt/jwt/v5 v5.2.1 // indirect
|
||||
|
2
go.sum
2
go.sum
@ -193,6 +193,8 @@ github.com/go-viper/mapstructure/v2 v2.2.1/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlnd
|
||||
github.com/gobwas/httphead v0.1.0/go.mod h1:O/RXo79gxV8G+RqlR/otEwx4Q36zl9rqC5u12GKvMCM=
|
||||
github.com/gobwas/pool v0.2.1/go.mod h1:q8bcK0KcYlCgd9e7WYLm9LpyS+YeLd8JVDW6WezmKEw=
|
||||
github.com/gobwas/ws v1.2.1/go.mod h1:hRKAFb8wOxFROYNsT1bqfWnhX+b5MFeJM9r2ZSwg/KY=
|
||||
github.com/goccy/go-json v0.10.5 h1:Fq85nIqj+gXn/S5ahsiTlK3TmC85qgirsdTP/+DeaC4=
|
||||
github.com/goccy/go-json v0.10.5/go.mod h1:oq7eo15ShAhp70Anwd5lgX2pLfOS3QCiwU/PULtXL6M=
|
||||
github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA=
|
||||
github.com/godbus/dbus/v5 v5.1.1-0.20230522191255-76236955d466 h1:sQspH8M4niEijh3PFscJRLDnkL547IeP7kpPe3uUhEg=
|
||||
github.com/godbus/dbus/v5 v5.1.1-0.20230522191255-76236955d466/go.mod h1:ZiQxhyQ+bbbfxUKVvjfO498oPYvtYhZzycal3G/NHmU=
|
||||
|
@ -3,7 +3,7 @@ package main
|
||||
//go:generate go run main.go
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"github.com/goccy/go-json"
|
||||
"fmt"
|
||||
"io"
|
||||
"log"
|
||||
|
@ -3,7 +3,7 @@ package db
|
||||
import (
|
||||
"context"
|
||||
"database/sql"
|
||||
"encoding/json"
|
||||
"github.com/goccy/go-json"
|
||||
"errors"
|
||||
"fmt"
|
||||
"net/netip"
|
||||
|
@ -1,7 +1,7 @@
|
||||
package db
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"github.com/goccy/go-json"
|
||||
"errors"
|
||||
"fmt"
|
||||
"net/netip"
|
||||
|
@ -1,7 +1,7 @@
|
||||
package hscontrol
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"github.com/goccy/go-json"
|
||||
"fmt"
|
||||
"net/http"
|
||||
|
||||
|
@ -2,7 +2,7 @@ package derp
|
||||
|
||||
import (
|
||||
"context"
|
||||
"encoding/json"
|
||||
"github.com/goccy/go-json"
|
||||
"io"
|
||||
"net/http"
|
||||
"net/url"
|
||||
|
@ -3,7 +3,7 @@ package server
|
||||
import (
|
||||
"bufio"
|
||||
"context"
|
||||
"encoding/json"
|
||||
"github.com/goccy/go-json"
|
||||
"fmt"
|
||||
"net"
|
||||
"net/http"
|
||||
|
@ -2,7 +2,7 @@ package dns
|
||||
|
||||
import (
|
||||
"crypto/sha256"
|
||||
"encoding/json"
|
||||
"github.com/goccy/go-json"
|
||||
"fmt"
|
||||
"os"
|
||||
"sync"
|
||||
|
@ -1,7 +1,7 @@
|
||||
package hscontrol
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"github.com/goccy/go-json"
|
||||
"errors"
|
||||
"fmt"
|
||||
"io"
|
||||
|
@ -2,7 +2,7 @@ package mapper
|
||||
|
||||
import (
|
||||
"encoding/binary"
|
||||
"encoding/json"
|
||||
"github.com/goccy/go-json"
|
||||
"fmt"
|
||||
"io/fs"
|
||||
"net/url"
|
||||
|
@ -1,7 +1,7 @@
|
||||
package mapper
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"github.com/goccy/go-json"
|
||||
"net/netip"
|
||||
"testing"
|
||||
"time"
|
||||
|
@ -2,7 +2,7 @@ package hscontrol
|
||||
|
||||
import (
|
||||
"encoding/binary"
|
||||
"encoding/json"
|
||||
"github.com/goccy/go-json"
|
||||
"errors"
|
||||
"fmt"
|
||||
"io"
|
||||
|
@ -1,7 +1,7 @@
|
||||
package v1
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"github.com/goccy/go-json"
|
||||
"errors"
|
||||
"fmt"
|
||||
"io"
|
||||
|
@ -1,7 +1,7 @@
|
||||
package v1
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"github.com/goccy/go-json"
|
||||
"net/netip"
|
||||
"strings"
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
package v2
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"github.com/goccy/go-json"
|
||||
"fmt"
|
||||
"net/netip"
|
||||
"strings"
|
||||
|
@ -2,7 +2,7 @@ package v2
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"encoding/json"
|
||||
"github.com/goccy/go-json"
|
||||
"fmt"
|
||||
"net/netip"
|
||||
"strings"
|
||||
|
@ -1,7 +1,7 @@
|
||||
package v2
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"github.com/goccy/go-json"
|
||||
"net/netip"
|
||||
"strings"
|
||||
"testing"
|
||||
|
@ -3,7 +3,7 @@ package types
|
||||
import (
|
||||
"cmp"
|
||||
"database/sql"
|
||||
"encoding/json"
|
||||
"github.com/goccy/go-json"
|
||||
"fmt"
|
||||
"net/mail"
|
||||
"net/url"
|
||||
|
@ -2,7 +2,7 @@ package types
|
||||
|
||||
import (
|
||||
"database/sql"
|
||||
"encoding/json"
|
||||
"github.com/goccy/go-json"
|
||||
"testing"
|
||||
|
||||
"github.com/google/go-cmp/cmp"
|
||||
|
@ -2,7 +2,7 @@ package integration
|
||||
|
||||
import (
|
||||
"cmp"
|
||||
"encoding/json"
|
||||
"github.com/goccy/go-json"
|
||||
"fmt"
|
||||
"strconv"
|
||||
"strings"
|
||||
|
@ -1,7 +1,7 @@
|
||||
package integration
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"github.com/goccy/go-json"
|
||||
"fmt"
|
||||
"net"
|
||||
"strconv"
|
||||
|
@ -1,7 +1,7 @@
|
||||
package integration
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"github.com/goccy/go-json"
|
||||
"fmt"
|
||||
"strings"
|
||||
"testing"
|
||||
|
@ -2,7 +2,7 @@ package integration
|
||||
|
||||
import (
|
||||
"context"
|
||||
"encoding/json"
|
||||
"github.com/goccy/go-json"
|
||||
"fmt"
|
||||
"net/netip"
|
||||
"strconv"
|
||||
|
@ -3,7 +3,7 @@ package hsic
|
||||
import (
|
||||
"cmp"
|
||||
"crypto/tls"
|
||||
"encoding/json"
|
||||
"github.com/goccy/go-json"
|
||||
"errors"
|
||||
"fmt"
|
||||
"io"
|
||||
|
@ -3,7 +3,7 @@ package integration
|
||||
import (
|
||||
"context"
|
||||
"crypto/tls"
|
||||
"encoding/json"
|
||||
"github.com/goccy/go-json"
|
||||
"errors"
|
||||
"fmt"
|
||||
"io"
|
||||
|
@ -4,7 +4,7 @@ import (
|
||||
"archive/tar"
|
||||
"bytes"
|
||||
"context"
|
||||
"encoding/json"
|
||||
"github.com/goccy/go-json"
|
||||
"errors"
|
||||
"fmt"
|
||||
"io"
|
||||
|
Loading…
Reference in New Issue
Block a user