Replace go.mod package with git.gammaspectra.live/P2Pool/go-json

This commit is contained in:
DataHoarder 2024-04-14 10:03:12 +02:00
parent 2410a4c5e9
commit 60d2daca40
Signed by: DataHoarder
SSH key fingerprint: SHA256:OLTRf6Fl87G52SiR7sWLGNzlJt4WOX+tfI2yxo0z7xk
102 changed files with 146 additions and 146 deletions

View file

@ -1,4 +1,4 @@
PKG := github.com/goccy/go-json
PKG := git.gammaspectra.live/P2Pool/go-json
BIN_DIR := $(CURDIR)/bin
PKGS := $(shell go list ./... | grep -v internal/cmd|grep -v test)

View file

@ -1,7 +1,7 @@
# go-json
![Go](https://github.com/goccy/go-json/workflows/Go/badge.svg)
[![GoDoc](https://godoc.org/github.com/goccy/go-json?status.svg)](https://pkg.go.dev/github.com/goccy/go-json?tab=doc)
![Go](https://git.gammaspectra.live/P2Pool/go-json/workflows/Go/badge.svg)
[![GoDoc](https://godoc.org/git.gammaspectra.live/P2Pool/go-json?status.svg)](https://pkg.go.dev/git.gammaspectra.live/P2Pool/go-json?tab=doc)
[![codecov](https://codecov.io/gh/goccy/go-json/branch/master/graph/badge.svg)](https://codecov.io/gh/goccy/go-json)
Fast JSON encoder/decoder compatible with encoding/json for Go
@ -22,12 +22,12 @@ Fast JSON encoder/decoder compatible with encoding/json for Go
```
We are accepting requests for features that will be implemented between v0.9.0 and v.1.0.0.
If you have the API you need, please submit your issue [here](https://github.com/goccy/go-json/issues).
If you have the API you need, please submit your issue [here](https://git.gammaspectra.live/P2Pool/go-json/issues).
# Features
- Drop-in replacement of `encoding/json`
- Fast ( See [Benchmark section](https://github.com/goccy/go-json#benchmarks) )
- Fast ( See [Benchmark section](https://git.gammaspectra.live/P2Pool/go-json#benchmarks) )
- Flexible customization with options
- Coloring the encoded string
- Can propagate context.Context to `MarshalJSON` or `UnmarshalJSON`
@ -36,16 +36,16 @@ If you have the API you need, please submit your issue [here](https://github.com
# Installation
```
go get github.com/goccy/go-json
go get git.gammaspectra.live/P2Pool/go-json
```
# How to use
Replace import statement from `encoding/json` to `github.com/goccy/go-json`
Replace import statement from `encoding/json` to `git.gammaspectra.live/P2Pool/go-json`
```
-import "encoding/json"
+import "github.com/goccy/go-json"
+import "git.gammaspectra.live/P2Pool/go-json"
```
# JSON library comparison
@ -98,8 +98,8 @@ $ go test -bench .
# Fuzzing
[go-json-fuzz](https://github.com/goccy/go-json-fuzz) is the repository for fuzzing tests.
If you run the test in this repository and find a bug, please commit to corpus to go-json-fuzz and report the issue to [go-json](https://github.com/goccy/go-json/issues).
[go-json-fuzz](https://git.gammaspectra.live/P2Pool/go-json-fuzz) is the repository for fuzzing tests.
If you run the test in this repository and find a bug, please commit to corpus to go-json-fuzz and report the issue to [go-json](https://git.gammaspectra.live/P2Pool/go-json/issues).
# How it works
@ -192,7 +192,7 @@ For this reason, to date `reflect.Type` is the same as `*reflect.rtype`.
Therefore, by directly handling `*reflect.rtype`, which is an implementation of `reflect.Type`, it is possible to avoid escaping because it changes from `interface` to using `struct`.
The technique for working with `*reflect.rtype` directly from `go-json` is implemented at [rtype.go](https://github.com/goccy/go-json/blob/master/internal/runtime/rtype.go)
The technique for working with `*reflect.rtype` directly from `go-json` is implemented at [rtype.go](https://git.gammaspectra.live/P2Pool/go-json/blob/master/internal/runtime/rtype.go)
Also, the same technique is cut out as a library ( https://github.com/goccy/go-reflect )
@ -353,7 +353,7 @@ However, if there is too much type information, it will use a lot of memory, so
If this approach is not available, it will fall back to the `atomic` based process described above.
If you want to know more, please refer to the implementation [here](https://github.com/goccy/go-json/blob/master/internal/runtime/type.go#L36-L100)
If you want to know more, please refer to the implementation [here](https://git.gammaspectra.live/P2Pool/go-json/blob/master/internal/runtime/type.go#L36-L100)
## Decoder

View file

@ -22,7 +22,7 @@ import (
stdjson "encoding/json"
"github.com/goccy/go-json"
"git.gammaspectra.live/P2Pool/go-json"
jsoniter "github.com/json-iterator/go"
segmentiojson "github.com/segmentio/encoding/json"
"github.com/wI2L/jettison"

View file

@ -5,8 +5,8 @@ import (
"encoding/json"
"testing"
gojson "git.gammaspectra.live/P2Pool/go-json"
gojay "github.com/francoispqt/gojay"
gojson "github.com/goccy/go-json"
jsoniter "github.com/json-iterator/go"
segmentiojson "github.com/segmentio/encoding/json"
fastjson "github.com/valyala/fastjson"

View file

@ -6,8 +6,8 @@ import (
"encoding/json"
"testing"
gojson "git.gammaspectra.live/P2Pool/go-json"
gojay "github.com/francoispqt/gojay"
gojson "github.com/goccy/go-json"
jsoniter "github.com/json-iterator/go"
"github.com/pquerna/ffjson/ffjson"
segmentiojson "github.com/segmentio/encoding/json"

View file

@ -4,7 +4,7 @@ go 1.12
require (
github.com/francoispqt/gojay v1.2.13
github.com/goccy/go-json v0.0.0-00010101000000-000000000000
git.gammaspectra.live/P2Pool/go-json v0.0.0-00010101000000-000000000000
github.com/json-iterator/go v1.1.10
github.com/mailru/easyjson v0.0.0-20190312143242-1de009706dbe
github.com/pquerna/ffjson v0.0.0-20190930134022-aa0246cd15f7
@ -14,4 +14,4 @@ require (
github.com/wI2L/jettison v0.7.1
)
replace github.com/goccy/go-json => ../
replace git.gammaspectra.live/P2Pool/go-json => ../

View file

@ -3,7 +3,7 @@ package benchmark
import (
"testing"
gojson "github.com/goccy/go-json"
gojson "git.gammaspectra.live/P2Pool/go-json"
)
func Benchmark_Decode_SmallStruct_UnmarshalPath_GoJson(b *testing.B) {

View file

@ -7,7 +7,7 @@ import (
"reflect"
"testing"
gojson "github.com/goccy/go-json"
gojson "git.gammaspectra.live/P2Pool/go-json"
)
// Benchmark decoding from a slow io.Reader that never fills the buffer completely

View file

@ -3,7 +3,7 @@ package json
import (
"fmt"
"github.com/goccy/go-json/internal/encoder"
"git.gammaspectra.live/P2Pool/go-json/internal/encoder"
)
type (

View file

@ -3,7 +3,7 @@ package json_test
import (
"testing"
"github.com/goccy/go-json"
"git.gammaspectra.live/P2Pool/go-json"
)
func TestColorize(t *testing.T) {

View file

@ -7,9 +7,9 @@ import (
"reflect"
"unsafe"
"github.com/goccy/go-json/internal/decoder"
"github.com/goccy/go-json/internal/errors"
"github.com/goccy/go-json/internal/runtime"
"git.gammaspectra.live/P2Pool/go-json/internal/decoder"
"git.gammaspectra.live/P2Pool/go-json/internal/errors"
"git.gammaspectra.live/P2Pool/go-json/internal/runtime"
)
type Decoder struct {

View file

@ -18,7 +18,7 @@ import (
"time"
"unsafe"
"github.com/goccy/go-json"
"git.gammaspectra.live/P2Pool/go-json"
)
func Test_Decoder(t *testing.T) {
@ -123,7 +123,7 @@ func Test_Decoder(t *testing.T) {
assertEq(t, "map.c", v["c"], 3)
assertEq(t, "map.d", v["d"], 4)
t.Run("nested map", func(t *testing.T) {
// https://github.com/goccy/go-json/issues/8
// https://git.gammaspectra.live/P2Pool/go-json/issues/8
content := `
{
"a": {

View file

@ -6,11 +6,11 @@ import (
"os"
"unsafe"
"github.com/goccy/go-json/internal/encoder"
"github.com/goccy/go-json/internal/encoder/vm"
"github.com/goccy/go-json/internal/encoder/vm_color"
"github.com/goccy/go-json/internal/encoder/vm_color_indent"
"github.com/goccy/go-json/internal/encoder/vm_indent"
"git.gammaspectra.live/P2Pool/go-json/internal/encoder"
"git.gammaspectra.live/P2Pool/go-json/internal/encoder/vm"
"git.gammaspectra.live/P2Pool/go-json/internal/encoder/vm_color"
"git.gammaspectra.live/P2Pool/go-json/internal/encoder/vm_color_indent"
"git.gammaspectra.live/P2Pool/go-json/internal/encoder/vm_indent"
)
// An Encoder writes JSON values to an output stream.

View file

@ -18,7 +18,7 @@ import (
"testing"
"time"
"github.com/goccy/go-json"
"git.gammaspectra.live/P2Pool/go-json"
)
type recursiveT struct {

View file

@ -1,7 +1,7 @@
package json
import (
"github.com/goccy/go-json/internal/errors"
"git.gammaspectra.live/P2Pool/go-json/internal/errors"
)
// Before Go 1.2, an InvalidUTF8Error was returned by Marshal when

View file

@ -1,7 +1,7 @@
package json
import (
"github.com/goccy/go-json/internal/errors"
"git.gammaspectra.live/P2Pool/go-json/internal/errors"
)
var (

2
go.mod
View file

@ -1,3 +1,3 @@
module github.com/goccy/go-json
module git.gammaspectra.live/P2Pool/go-json
go 1.19

View file

@ -7,8 +7,8 @@ import (
"sort"
"unsafe"
"github.com/goccy/go-json/internal/encoder"
"github.com/goccy/go-json/internal/runtime"
"git.gammaspectra.live/P2Pool/go-json/internal/encoder"
"git.gammaspectra.live/P2Pool/go-json/internal/runtime"
)
func Run(ctx *encoder.RuntimeContext, b []byte, codeSet *encoder.OpcodeSet) ([]byte, error) {

View file

@ -3,7 +3,7 @@ package decoder
import (
"unsafe"
"github.com/goccy/go-json/internal/runtime"
"git.gammaspectra.live/P2Pool/go-json/internal/runtime"
)
type anonymousFieldDecoder struct {

View file

@ -4,8 +4,8 @@ import (
"fmt"
"unsafe"
"github.com/goccy/go-json/internal/errors"
"github.com/goccy/go-json/internal/runtime"
"git.gammaspectra.live/P2Pool/go-json/internal/errors"
"git.gammaspectra.live/P2Pool/go-json/internal/runtime"
)
type arrayDecoder struct {

View file

@ -4,7 +4,7 @@ import (
"fmt"
"unsafe"
"github.com/goccy/go-json/internal/errors"
"git.gammaspectra.live/P2Pool/go-json/internal/errors"
)
type boolDecoder struct {

View file

@ -5,8 +5,8 @@ import (
"fmt"
"unsafe"
"github.com/goccy/go-json/internal/errors"
"github.com/goccy/go-json/internal/runtime"
"git.gammaspectra.live/P2Pool/go-json/internal/errors"
"git.gammaspectra.live/P2Pool/go-json/internal/runtime"
)
type bytesDecoder struct {

View file

@ -9,7 +9,7 @@ import (
"unicode"
"unsafe"
"github.com/goccy/go-json/internal/runtime"
"git.gammaspectra.live/P2Pool/go-json/internal/runtime"
)
var (

View file

@ -6,7 +6,7 @@ package decoder
import (
"unsafe"
"github.com/goccy/go-json/internal/runtime"
"git.gammaspectra.live/P2Pool/go-json/internal/runtime"
)
func CompileToGetDecoder(typ *runtime.Type) (Decoder, error) {

View file

@ -7,7 +7,7 @@ import (
"sync"
"unsafe"
"github.com/goccy/go-json/internal/runtime"
"git.gammaspectra.live/P2Pool/go-json/internal/runtime"
)
var decMu sync.RWMutex

View file

@ -4,7 +4,7 @@ import (
"sync"
"unsafe"
"github.com/goccy/go-json/internal/errors"
"git.gammaspectra.live/P2Pool/go-json/internal/errors"
)
type RuntimeContext struct {

View file

@ -4,7 +4,7 @@ import (
"strconv"
"unsafe"
"github.com/goccy/go-json/internal/errors"
"git.gammaspectra.live/P2Pool/go-json/internal/errors"
)
type floatDecoder struct {

View file

@ -5,8 +5,8 @@ import (
"fmt"
"unsafe"
"github.com/goccy/go-json/internal/errors"
"github.com/goccy/go-json/internal/runtime"
"git.gammaspectra.live/P2Pool/go-json/internal/errors"
"git.gammaspectra.live/P2Pool/go-json/internal/runtime"
)
type funcDecoder struct {

View file

@ -5,8 +5,8 @@ import (
"reflect"
"unsafe"
"github.com/goccy/go-json/internal/errors"
"github.com/goccy/go-json/internal/runtime"
"git.gammaspectra.live/P2Pool/go-json/internal/errors"
"git.gammaspectra.live/P2Pool/go-json/internal/runtime"
)
type intDecoder struct {

View file

@ -7,8 +7,8 @@ import (
"reflect"
"unsafe"
"github.com/goccy/go-json/internal/errors"
"github.com/goccy/go-json/internal/runtime"
"git.gammaspectra.live/P2Pool/go-json/internal/errors"
"git.gammaspectra.live/P2Pool/go-json/internal/runtime"
)
type interfaceDecoder struct {

View file

@ -4,8 +4,8 @@ import (
"reflect"
"unsafe"
"github.com/goccy/go-json/internal/errors"
"github.com/goccy/go-json/internal/runtime"
"git.gammaspectra.live/P2Pool/go-json/internal/errors"
"git.gammaspectra.live/P2Pool/go-json/internal/runtime"
)
type invalidDecoder struct {

View file

@ -4,8 +4,8 @@ import (
"reflect"
"unsafe"
"github.com/goccy/go-json/internal/errors"
"github.com/goccy/go-json/internal/runtime"
"git.gammaspectra.live/P2Pool/go-json/internal/errors"
"git.gammaspectra.live/P2Pool/go-json/internal/runtime"
)
type mapDecoder struct {
@ -36,7 +36,7 @@ const (
mapMaxElemSize = 128
)
// See detail: https://github.com/goccy/go-json/pull/283
// See detail: https://git.gammaspectra.live/P2Pool/go-json/pull/283
func canUseAssignFaststrType(key *runtime.Type, value *runtime.Type) bool {
indirectElem := value.Size() > mapMaxElemSize
if indirectElem {

View file

@ -5,7 +5,7 @@ import (
"strconv"
"unsafe"
"github.com/goccy/go-json/internal/errors"
"git.gammaspectra.live/P2Pool/go-json/internal/errors"
)
type numberDecoder struct {

View file

@ -5,8 +5,8 @@ import (
"reflect"
"strconv"
"github.com/goccy/go-json/internal/errors"
"github.com/goccy/go-json/internal/runtime"
"git.gammaspectra.live/P2Pool/go-json/internal/errors"
"git.gammaspectra.live/P2Pool/go-json/internal/runtime"
)
type PathString string

View file

@ -4,7 +4,7 @@ import (
"fmt"
"unsafe"
"github.com/goccy/go-json/internal/runtime"
"git.gammaspectra.live/P2Pool/go-json/internal/runtime"
)
type ptrDecoder struct {

View file

@ -5,8 +5,8 @@ import (
"sync"
"unsafe"
"github.com/goccy/go-json/internal/errors"
"github.com/goccy/go-json/internal/runtime"
"git.gammaspectra.live/P2Pool/go-json/internal/errors"
"git.gammaspectra.live/P2Pool/go-json/internal/runtime"
)
var (

View file

@ -7,7 +7,7 @@ import (
"strconv"
"unsafe"
"github.com/goccy/go-json/internal/errors"
"git.gammaspectra.live/P2Pool/go-json/internal/errors"
)
const (

View file

@ -9,7 +9,7 @@ import (
"unicode/utf8"
"unsafe"
"github.com/goccy/go-json/internal/errors"
"git.gammaspectra.live/P2Pool/go-json/internal/errors"
)
type stringDecoder struct {

View file

@ -10,7 +10,7 @@ import (
"unicode/utf16"
"unsafe"
"github.com/goccy/go-json/internal/errors"
"git.gammaspectra.live/P2Pool/go-json/internal/errors"
)
type structFieldSet struct {

View file

@ -5,8 +5,8 @@ import (
"reflect"
"unsafe"
"github.com/goccy/go-json/internal/errors"
"github.com/goccy/go-json/internal/runtime"
"git.gammaspectra.live/P2Pool/go-json/internal/errors"
"git.gammaspectra.live/P2Pool/go-json/internal/runtime"
)
type uintDecoder struct {

View file

@ -6,8 +6,8 @@ import (
"fmt"
"unsafe"
"github.com/goccy/go-json/internal/errors"
"github.com/goccy/go-json/internal/runtime"
"git.gammaspectra.live/P2Pool/go-json/internal/errors"
"git.gammaspectra.live/P2Pool/go-json/internal/runtime"
)
type unmarshalJSONDecoder struct {

View file

@ -9,8 +9,8 @@ import (
"unicode/utf8"
"unsafe"
"github.com/goccy/go-json/internal/errors"
"github.com/goccy/go-json/internal/runtime"
"git.gammaspectra.live/P2Pool/go-json/internal/errors"
"git.gammaspectra.live/P2Pool/go-json/internal/runtime"
)
type unmarshalTextDecoder struct {

View file

@ -5,7 +5,7 @@ import (
"reflect"
"unsafe"
"github.com/goccy/go-json/internal/runtime"
"git.gammaspectra.live/P2Pool/go-json/internal/runtime"
)
type wrappedStringDecoder struct {

View file

@ -5,7 +5,7 @@ import (
"reflect"
"unsafe"
"github.com/goccy/go-json/internal/runtime"
"git.gammaspectra.live/P2Pool/go-json/internal/runtime"
)
type Code interface {

View file

@ -6,7 +6,7 @@ import (
"strconv"
"unsafe"
"github.com/goccy/go-json/internal/errors"
"git.gammaspectra.live/P2Pool/go-json/internal/errors"
)
var (

View file

@ -8,8 +8,8 @@ import (
"sync/atomic"
"unsafe"
"github.com/goccy/go-json/internal/errors"
"github.com/goccy/go-json/internal/runtime"
"git.gammaspectra.live/P2Pool/go-json/internal/errors"
"git.gammaspectra.live/P2Pool/go-json/internal/runtime"
)
type marshalerContext interface {
@ -489,7 +489,7 @@ func (c *Compiler) listElemCode(typ *runtime.Type) (Code, error) {
default:
// isPtr was originally used to indicate whether the type of top level is pointer.
// However, since the slice/array element is a specification that can get the pointer address, explicitly set isPtr to true.
// See here for related issues: https://github.com/goccy/go-json/issues/370
// See here for related issues: https://git.gammaspectra.live/P2Pool/go-json/issues/370
code, err := c.typeToCodeWithPtr(typ, true)
if err != nil {
return nil, err

View file

@ -5,7 +5,7 @@ import (
"sync"
"unsafe"
"github.com/goccy/go-json/internal/runtime"
"git.gammaspectra.live/P2Pool/go-json/internal/runtime"
)
type compileContext struct {

View file

@ -13,8 +13,8 @@ import (
"sync"
"unsafe"
"github.com/goccy/go-json/internal/errors"
"github.com/goccy/go-json/internal/runtime"
"git.gammaspectra.live/P2Pool/go-json/internal/errors"
"git.gammaspectra.live/P2Pool/go-json/internal/runtime"
)
func (t OpType) IsMultipleOpHead() bool {

View file

@ -4,7 +4,7 @@ import (
"bytes"
"fmt"
"github.com/goccy/go-json/internal/errors"
"git.gammaspectra.live/P2Pool/go-json/internal/errors"
)
func takeIndentSrcRuntimeContext(src []byte) (*RuntimeContext, []byte) {

View file

@ -7,7 +7,7 @@ import (
"strings"
"unsafe"
"github.com/goccy/go-json/internal/runtime"
"git.gammaspectra.live/P2Pool/go-json/internal/runtime"
)
const uintptrSize = 4 << (^uintptr(0) >> 63)

View file

@ -4,7 +4,7 @@ import (
"fmt"
"io"
"github.com/goccy/go-json/internal/encoder"
"git.gammaspectra.live/P2Pool/go-json/internal/encoder"
)
func DebugRun(ctx *encoder.RuntimeContext, b []byte, codeSet *encoder.OpcodeSet) ([]byte, error) {

View file

@ -5,5 +5,5 @@ import (
// `vm`, `vm_indent`, `vm_color`, `vm_color_indent` packages uses a lot of memory to compile,
// so forcibly make dependencies and avoid compiling in concurrent.
// dependency order: vm => vm_indent => vm_color => vm_color_indent
_ "github.com/goccy/go-json/internal/encoder/vm_indent"
_ "git.gammaspectra.live/P2Pool/go-json/internal/encoder/vm_indent"
)

View file

@ -5,8 +5,8 @@ import (
"fmt"
"unsafe"
"github.com/goccy/go-json/internal/encoder"
"github.com/goccy/go-json/internal/runtime"
"git.gammaspectra.live/P2Pool/go-json/internal/encoder"
"git.gammaspectra.live/P2Pool/go-json/internal/runtime"
)
const uintptrSize = 4 << (^uintptr(0) >> 63)

View file

@ -7,8 +7,8 @@ import (
"sort"
"unsafe"
"github.com/goccy/go-json/internal/encoder"
"github.com/goccy/go-json/internal/runtime"
"git.gammaspectra.live/P2Pool/go-json/internal/encoder"
"git.gammaspectra.live/P2Pool/go-json/internal/runtime"
)
func Run(ctx *encoder.RuntimeContext, b []byte, codeSet *encoder.OpcodeSet) ([]byte, error) {

View file

@ -3,7 +3,7 @@ package vm_color
import (
"fmt"
"github.com/goccy/go-json/internal/encoder"
"git.gammaspectra.live/P2Pool/go-json/internal/encoder"
)
func DebugRun(ctx *encoder.RuntimeContext, b []byte, codeSet *encoder.OpcodeSet) ([]byte, error) {

View file

@ -5,5 +5,5 @@ import (
// `vm`, `vm_indent`, `vm_color`, `vm_color_indent` packages uses a lot of memory to compile,
// so forcibly make dependencies and avoid compiling in concurrent.
// dependency order: vm => vm_indent => vm_color => vm_color_indent
_ "github.com/goccy/go-json/internal/encoder/vm_color_indent"
_ "git.gammaspectra.live/P2Pool/go-json/internal/encoder/vm_color_indent"
)

View file

@ -5,8 +5,8 @@ import (
"fmt"
"unsafe"
"github.com/goccy/go-json/internal/encoder"
"github.com/goccy/go-json/internal/runtime"
"git.gammaspectra.live/P2Pool/go-json/internal/encoder"
"git.gammaspectra.live/P2Pool/go-json/internal/runtime"
)
const uintptrSize = 4 << (^uintptr(0) >> 63)

View file

@ -7,8 +7,8 @@ import (
"sort"
"unsafe"
"github.com/goccy/go-json/internal/encoder"
"github.com/goccy/go-json/internal/runtime"
"git.gammaspectra.live/P2Pool/go-json/internal/encoder"
"git.gammaspectra.live/P2Pool/go-json/internal/runtime"
)
func Run(ctx *encoder.RuntimeContext, b []byte, codeSet *encoder.OpcodeSet) ([]byte, error) {

View file

@ -3,7 +3,7 @@ package vm_color_indent
import (
"fmt"
"github.com/goccy/go-json/internal/encoder"
"git.gammaspectra.live/P2Pool/go-json/internal/encoder"
)
func DebugRun(ctx *encoder.RuntimeContext, b []byte, codeSet *encoder.OpcodeSet) ([]byte, error) {

View file

@ -5,8 +5,8 @@ import (
"fmt"
"unsafe"
"github.com/goccy/go-json/internal/encoder"
"github.com/goccy/go-json/internal/runtime"
"git.gammaspectra.live/P2Pool/go-json/internal/encoder"
"git.gammaspectra.live/P2Pool/go-json/internal/runtime"
)
const uintptrSize = 4 << (^uintptr(0) >> 63)

View file

@ -7,8 +7,8 @@ import (
"sort"
"unsafe"
"github.com/goccy/go-json/internal/encoder"
"github.com/goccy/go-json/internal/runtime"
"git.gammaspectra.live/P2Pool/go-json/internal/encoder"
"git.gammaspectra.live/P2Pool/go-json/internal/runtime"
)
func Run(ctx *encoder.RuntimeContext, b []byte, codeSet *encoder.OpcodeSet) ([]byte, error) {

View file

@ -3,7 +3,7 @@ package vm_indent
import (
"fmt"
"github.com/goccy/go-json/internal/encoder"
"git.gammaspectra.live/P2Pool/go-json/internal/encoder"
)
func DebugRun(ctx *encoder.RuntimeContext, b []byte, codeSet *encoder.OpcodeSet) ([]byte, error) {

View file

@ -5,5 +5,5 @@ import (
// `vm`, `vm_indent`, `vm_color`, `vm_color_indent` packages uses a lot of memory to compile,
// so forcibly make dependencies and avoid compiling in concurrent.
// dependency order: vm => vm_indent => vm_color => vm_color_indent
_ "github.com/goccy/go-json/internal/encoder/vm_color"
_ "git.gammaspectra.live/P2Pool/go-json/internal/encoder/vm_color"
)

View file

@ -5,8 +5,8 @@ import (
"fmt"
"unsafe"
"github.com/goccy/go-json/internal/encoder"
"github.com/goccy/go-json/internal/runtime"
"git.gammaspectra.live/P2Pool/go-json/internal/encoder"
"git.gammaspectra.live/P2Pool/go-json/internal/runtime"
)
const uintptrSize = 4 << (^uintptr(0) >> 63)

View file

@ -7,8 +7,8 @@ import (
"sort"
"unsafe"
"github.com/goccy/go-json/internal/encoder"
"github.com/goccy/go-json/internal/runtime"
"git.gammaspectra.live/P2Pool/go-json/internal/encoder"
"git.gammaspectra.live/P2Pool/go-json/internal/runtime"
)
func Run(ctx *encoder.RuntimeContext, b []byte, codeSet *encoder.OpcodeSet) ([]byte, error) {

View file

@ -5,7 +5,7 @@ import (
"context"
"encoding/json"
"github.com/goccy/go-json/internal/encoder"
"git.gammaspectra.live/P2Pool/go-json/internal/encoder"
)
// Marshaler is the interface implemented by types that

View file

@ -8,7 +8,7 @@ import (
"reflect"
"testing"
"github.com/goccy/go-json"
"git.gammaspectra.live/P2Pool/go-json"
)
var validTests = []struct {

View file

@ -8,7 +8,7 @@ import (
"regexp"
"testing"
"github.com/goccy/go-json"
"git.gammaspectra.live/P2Pool/go-json"
)
func TestNumberIsValid(t *testing.T) {

View file

@ -3,8 +3,8 @@ package json
import (
"io"
"github.com/goccy/go-json/internal/decoder"
"github.com/goccy/go-json/internal/encoder"
"git.gammaspectra.live/P2Pool/go-json/internal/decoder"
"git.gammaspectra.live/P2Pool/go-json/internal/encoder"
)
type EncodeOption = encoder.Option

View file

@ -3,7 +3,7 @@ package json
import (
"reflect"
"github.com/goccy/go-json/internal/decoder"
"git.gammaspectra.live/P2Pool/go-json/internal/decoder"
)
// CreatePath creates JSON Path.

View file

@ -6,7 +6,7 @@ import (
"sort"
"testing"
"github.com/goccy/go-json"
"git.gammaspectra.live/P2Pool/go-json"
)
func TestExtractPath(t *testing.T) {

View file

@ -1,7 +1,7 @@
package json
import (
"github.com/goccy/go-json/internal/encoder"
"git.gammaspectra.live/P2Pool/go-json/internal/encoder"
)
type (

View file

@ -5,7 +5,7 @@ import (
"reflect"
"testing"
"github.com/goccy/go-json"
"git.gammaspectra.live/P2Pool/go-json"
)
type queryTestX struct {

View file

@ -4,7 +4,7 @@ import (
"testing"
"unsafe"
"github.com/goccy/go-json/internal/encoder"
"git.gammaspectra.live/P2Pool/go-json/internal/encoder"
)
func TestOpcodeSize(t *testing.T) {

View file

@ -19,7 +19,7 @@ import (
"strings"
"testing"
"github.com/goccy/go-json"
"git.gammaspectra.live/P2Pool/go-json"
)
// Test values for the stream test.

View file

@ -7,7 +7,7 @@ package json_test
import (
"testing"
"github.com/goccy/go-json"
"git.gammaspectra.live/P2Pool/go-json"
)
type basicLatin2xTag struct {

View file

@ -5,7 +5,7 @@ import (
"fmt"
"testing"
"github.com/goccy/go-json"
"git.gammaspectra.live/P2Pool/go-json"
)
type customArray [2]int

View file

@ -6,7 +6,7 @@ import (
"fmt"
"testing"
"github.com/goccy/go-json"
"git.gammaspectra.live/P2Pool/go-json"
)
type customBool bool

View file

@ -5,7 +5,7 @@ import (
"fmt"
"testing"
"github.com/goccy/go-json"
"git.gammaspectra.live/P2Pool/go-json"
)
func TestCoverBytes(t *testing.T) {

View file

@ -5,7 +5,7 @@ import (
"fmt"
"testing"
"github.com/goccy/go-json"
"git.gammaspectra.live/P2Pool/go-json"
)
func TestCoverFloat32(t *testing.T) {

View file

@ -5,7 +5,7 @@ import (
"fmt"
"testing"
"github.com/goccy/go-json"
"git.gammaspectra.live/P2Pool/go-json"
)
func TestCoverFloat64(t *testing.T) {

View file

@ -4,7 +4,7 @@ import (
"bytes"
stdjson "encoding/json"
"github.com/goccy/go-json"
"git.gammaspectra.live/P2Pool/go-json"
)
func intptr(v int) *int { return &v }

View file

@ -5,7 +5,7 @@ import (
"fmt"
"testing"
"github.com/goccy/go-json"
"git.gammaspectra.live/P2Pool/go-json"
)
func TestCoverInt16(t *testing.T) {

View file

@ -5,7 +5,7 @@ import (
"fmt"
"testing"
"github.com/goccy/go-json"
"git.gammaspectra.live/P2Pool/go-json"
)
func TestCoverInt32(t *testing.T) {

View file

@ -5,7 +5,7 @@ import (
"fmt"
"testing"
"github.com/goccy/go-json"
"git.gammaspectra.live/P2Pool/go-json"
)
func TestCoverInt64(t *testing.T) {

View file

@ -5,7 +5,7 @@ import (
"fmt"
"testing"
"github.com/goccy/go-json"
"git.gammaspectra.live/P2Pool/go-json"
)
func TestCoverInt8(t *testing.T) {

View file

@ -5,7 +5,7 @@ import (
"fmt"
"testing"
"github.com/goccy/go-json"
"git.gammaspectra.live/P2Pool/go-json"
)
func TestCoverInt(t *testing.T) {

View file

@ -5,7 +5,7 @@ import (
"fmt"
"testing"
"github.com/goccy/go-json"
"git.gammaspectra.live/P2Pool/go-json"
)
type recursiveMap struct {

View file

@ -5,7 +5,7 @@ import (
"fmt"
"testing"
"github.com/goccy/go-json"
"git.gammaspectra.live/P2Pool/go-json"
)
type coverMarshalJSON struct {

View file

@ -5,7 +5,7 @@ import (
"fmt"
"testing"
"github.com/goccy/go-json"
"git.gammaspectra.live/P2Pool/go-json"
)
type coverMarshalText struct {

View file

@ -5,7 +5,7 @@ import (
"fmt"
"testing"
"github.com/goccy/go-json"
"git.gammaspectra.live/P2Pool/go-json"
)
func TestCoverNumber(t *testing.T) {

View file

@ -5,7 +5,7 @@ import (
"fmt"
"testing"
"github.com/goccy/go-json"
"git.gammaspectra.live/P2Pool/go-json"
)
type coverSliceMarshalJSON struct {

View file

@ -5,7 +5,7 @@ import (
"fmt"
"testing"
"github.com/goccy/go-json"
"git.gammaspectra.live/P2Pool/go-json"
)
func TestCoverString(t *testing.T) {

View file

@ -5,7 +5,7 @@ import (
"fmt"
"testing"
"github.com/goccy/go-json"
"git.gammaspectra.live/P2Pool/go-json"
)
func TestCoverUint16(t *testing.T) {

View file

@ -5,7 +5,7 @@ import (
"fmt"
"testing"
"github.com/goccy/go-json"
"git.gammaspectra.live/P2Pool/go-json"
)
func TestCoverUint32(t *testing.T) {

View file

@ -5,7 +5,7 @@ import (
"fmt"
"testing"
"github.com/goccy/go-json"
"git.gammaspectra.live/P2Pool/go-json"
)
func TestCoverUint64(t *testing.T) {

View file

@ -5,7 +5,7 @@ import (
"fmt"
"testing"
"github.com/goccy/go-json"
"git.gammaspectra.live/P2Pool/go-json"
)
func TestCoverUint8(t *testing.T) {

View file

@ -5,7 +5,7 @@ import (
"fmt"
"testing"
"github.com/goccy/go-json"
"git.gammaspectra.live/P2Pool/go-json"
)
func TestCoverUint(t *testing.T) {

View file

@ -9,7 +9,7 @@ import (
"log"
"strings"
"github.com/goccy/go-json"
"git.gammaspectra.live/P2Pool/go-json"
)
type Animal int

View file

@ -5,7 +5,7 @@ import (
"fmt"
"log"
"github.com/goccy/go-json"
"git.gammaspectra.live/P2Pool/go-json"
)
type User struct {

Some files were not shown because too many files have changed in this diff Show more