mirror of
https://github.com/containers/podman.git
synced 2025-06-06 15:00:40 +08:00
Bump github.com/json-iterator/go from 1.1.11 to 1.1.12
Bumps [github.com/json-iterator/go](https://github.com/json-iterator/go) from 1.1.11 to 1.1.12. - [Release notes](https://github.com/json-iterator/go/releases) - [Commits](https://github.com/json-iterator/go/compare/v1.1.11...v1.1.12) --- updated-dependencies: - dependency-name: github.com/json-iterator/go dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com>
This commit is contained in:
2
go.mod
2
go.mod
@ -40,7 +40,7 @@ require (
|
|||||||
github.com/gorilla/schema v1.2.0
|
github.com/gorilla/schema v1.2.0
|
||||||
github.com/hashicorp/go-multierror v1.1.1
|
github.com/hashicorp/go-multierror v1.1.1
|
||||||
github.com/hpcloud/tail v1.0.0
|
github.com/hpcloud/tail v1.0.0
|
||||||
github.com/json-iterator/go v1.1.11
|
github.com/json-iterator/go v1.1.12
|
||||||
github.com/mattn/go-colorable v0.1.8 // indirect
|
github.com/mattn/go-colorable v0.1.8 // indirect
|
||||||
github.com/moby/term v0.0.0-20201216013528-df9cb8a40635
|
github.com/moby/term v0.0.0-20201216013528-df9cb8a40635
|
||||||
github.com/mrunalp/fileutils v0.5.0
|
github.com/mrunalp/fileutils v0.5.0
|
||||||
|
6
go.sum
6
go.sum
@ -576,8 +576,9 @@ github.com/jsimonetti/rtnetlink v0.0.0-20201110080708-d2c240429e6c/go.mod h1:huN
|
|||||||
github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU=
|
github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU=
|
||||||
github.com/json-iterator/go v1.1.7/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4=
|
github.com/json-iterator/go v1.1.7/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4=
|
||||||
github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4=
|
github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4=
|
||||||
github.com/json-iterator/go v1.1.11 h1:uVUAXhF2To8cbw/3xN3pxj6kk7TYKs98NIrTqPlMWAQ=
|
|
||||||
github.com/json-iterator/go v1.1.11/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4=
|
github.com/json-iterator/go v1.1.11/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4=
|
||||||
|
github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM=
|
||||||
|
github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo=
|
||||||
github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU=
|
github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU=
|
||||||
github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk=
|
github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk=
|
||||||
github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU=
|
github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU=
|
||||||
@ -681,8 +682,9 @@ github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJ
|
|||||||
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg=
|
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg=
|
||||||
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
|
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
|
||||||
github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=
|
github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=
|
||||||
github.com/modern-go/reflect2 v1.0.1 h1:9f412s+6RmYXLWZSEzVVgPGK7C2PphHj5RJrvfx9AWI=
|
|
||||||
github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=
|
github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=
|
||||||
|
github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M=
|
||||||
|
github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk=
|
||||||
github.com/morikuni/aec v1.0.0 h1:nP9CBfwrvYnBRgY6qfDQkygYDmYwOilePFkwzv4dU8A=
|
github.com/morikuni/aec v1.0.0 h1:nP9CBfwrvYnBRgY6qfDQkygYDmYwOilePFkwzv4dU8A=
|
||||||
github.com/morikuni/aec v1.0.0/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7PXmsc=
|
github.com/morikuni/aec v1.0.0/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7PXmsc=
|
||||||
github.com/mrunalp/fileutils v0.0.0-20171103030105-7d4729fb3618/go.mod h1:x8F1gnqOkIEiO4rqoeEEEqQbo7HjGMTvyoq3gej4iT0=
|
github.com/mrunalp/fileutils v0.0.0-20171103030105-7d4729fb3618/go.mod h1:x8F1gnqOkIEiO4rqoeEEEqQbo7HjGMTvyoq3gej4iT0=
|
||||||
|
2
vendor/github.com/json-iterator/go/README.md
generated
vendored
2
vendor/github.com/json-iterator/go/README.md
generated
vendored
@ -8,8 +8,6 @@
|
|||||||
|
|
||||||
A high-performance 100% compatible drop-in replacement of "encoding/json"
|
A high-performance 100% compatible drop-in replacement of "encoding/json"
|
||||||
|
|
||||||
You can also use thrift like JSON using [thrift-iterator](https://github.com/thrift-iterator/go)
|
|
||||||
|
|
||||||
# Benchmark
|
# Benchmark
|
||||||
|
|
||||||

|

|
||||||
|
2
vendor/github.com/json-iterator/go/go.mod
generated
vendored
2
vendor/github.com/json-iterator/go/go.mod
generated
vendored
@ -6,6 +6,6 @@ require (
|
|||||||
github.com/davecgh/go-spew v1.1.1
|
github.com/davecgh/go-spew v1.1.1
|
||||||
github.com/google/gofuzz v1.0.0
|
github.com/google/gofuzz v1.0.0
|
||||||
github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421
|
github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421
|
||||||
github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742
|
github.com/modern-go/reflect2 v1.0.2
|
||||||
github.com/stretchr/testify v1.3.0
|
github.com/stretchr/testify v1.3.0
|
||||||
)
|
)
|
||||||
|
5
vendor/github.com/json-iterator/go/go.sum
generated
vendored
5
vendor/github.com/json-iterator/go/go.sum
generated
vendored
@ -5,11 +5,10 @@ github.com/google/gofuzz v1.0.0 h1:A8PeW59pxE9IoFRqBp37U+mSNaQoZ46F1f0f863XSXw=
|
|||||||
github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
|
github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
|
||||||
github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421 h1:ZqeYNhU3OHLH3mGKHDcjJRFFRrJa6eAM5H+CtDdOsPc=
|
github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421 h1:ZqeYNhU3OHLH3mGKHDcjJRFFRrJa6eAM5H+CtDdOsPc=
|
||||||
github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
|
github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
|
||||||
github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742 h1:Esafd1046DLDQ0W1YjYsBW+p8U2u7vzgW2SQVmlNazg=
|
github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M=
|
||||||
github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=
|
github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk=
|
||||||
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
|
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
|
||||||
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
|
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
|
||||||
github.com/stretchr/objx v0.1.0 h1:4G4v2dO3VZwixGIRoQ5Lfboy6nUhCyYzaqnIAPPhYs4=
|
|
||||||
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
|
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
|
||||||
github.com/stretchr/testify v1.3.0 h1:TivCn/peBQ7UY8ooIcPgZFpTNSz0Q2U6UrFlUfqbe0Q=
|
github.com/stretchr/testify v1.3.0 h1:TivCn/peBQ7UY8ooIcPgZFpTNSz0Q2U6UrFlUfqbe0Q=
|
||||||
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
|
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
|
||||||
|
2
vendor/github.com/modern-go/reflect2/.travis.yml
generated
vendored
2
vendor/github.com/modern-go/reflect2/.travis.yml
generated
vendored
@ -1,7 +1,7 @@
|
|||||||
language: go
|
language: go
|
||||||
|
|
||||||
go:
|
go:
|
||||||
- 1.8.x
|
- 1.9.x
|
||||||
- 1.x
|
- 1.x
|
||||||
|
|
||||||
before_install:
|
before_install:
|
||||||
|
8
vendor/github.com/modern-go/reflect2/Gopkg.lock
generated
vendored
8
vendor/github.com/modern-go/reflect2/Gopkg.lock
generated
vendored
@ -1,15 +1,9 @@
|
|||||||
# This file is autogenerated, do not edit; changes may be undone by the next 'dep ensure'.
|
# This file is autogenerated, do not edit; changes may be undone by the next 'dep ensure'.
|
||||||
|
|
||||||
|
|
||||||
[[projects]]
|
|
||||||
name = "github.com/modern-go/concurrent"
|
|
||||||
packages = ["."]
|
|
||||||
revision = "e0a39a4cb4216ea8db28e22a69f4ec25610d513a"
|
|
||||||
version = "1.0.0"
|
|
||||||
|
|
||||||
[solve-meta]
|
[solve-meta]
|
||||||
analyzer-name = "dep"
|
analyzer-name = "dep"
|
||||||
analyzer-version = 1
|
analyzer-version = 1
|
||||||
inputs-digest = "daee8a88b3498b61c5640056665b8b9eea062006f5e596bbb6a3ed9119a11ec7"
|
input-imports = []
|
||||||
solver-name = "gps-cdcl"
|
solver-name = "gps-cdcl"
|
||||||
solver-version = 1
|
solver-version = 1
|
||||||
|
4
vendor/github.com/modern-go/reflect2/Gopkg.toml
generated
vendored
4
vendor/github.com/modern-go/reflect2/Gopkg.toml
generated
vendored
@ -26,10 +26,6 @@
|
|||||||
|
|
||||||
ignored = []
|
ignored = []
|
||||||
|
|
||||||
[[constraint]]
|
|
||||||
name = "github.com/modern-go/concurrent"
|
|
||||||
version = "1.0.0"
|
|
||||||
|
|
||||||
[prune]
|
[prune]
|
||||||
go-tests = true
|
go-tests = true
|
||||||
unused-packages = true
|
unused-packages = true
|
||||||
|
3
vendor/github.com/modern-go/reflect2/go.mod
generated
vendored
Normal file
3
vendor/github.com/modern-go/reflect2/go.mod
generated
vendored
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
module github.com/modern-go/reflect2
|
||||||
|
|
||||||
|
go 1.12
|
23
vendor/github.com/modern-go/reflect2/go_above_118.go
generated
vendored
Normal file
23
vendor/github.com/modern-go/reflect2/go_above_118.go
generated
vendored
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
//+build go1.18
|
||||||
|
|
||||||
|
package reflect2
|
||||||
|
|
||||||
|
import (
|
||||||
|
"unsafe"
|
||||||
|
)
|
||||||
|
|
||||||
|
// m escapes into the return value, but the caller of mapiterinit
|
||||||
|
// doesn't let the return value escape.
|
||||||
|
//go:noescape
|
||||||
|
//go:linkname mapiterinit reflect.mapiterinit
|
||||||
|
func mapiterinit(rtype unsafe.Pointer, m unsafe.Pointer, it *hiter)
|
||||||
|
|
||||||
|
func (type2 *UnsafeMapType) UnsafeIterate(obj unsafe.Pointer) MapIterator {
|
||||||
|
var it hiter
|
||||||
|
mapiterinit(type2.rtype, *(*unsafe.Pointer)(obj), &it)
|
||||||
|
return &UnsafeMapIterator{
|
||||||
|
hiter: &it,
|
||||||
|
pKeyRType: type2.pKeyRType,
|
||||||
|
pElemRType: type2.pElemRType,
|
||||||
|
}
|
||||||
|
}
|
8
vendor/github.com/modern-go/reflect2/go_above_17.go
generated
vendored
8
vendor/github.com/modern-go/reflect2/go_above_17.go
generated
vendored
@ -1,8 +0,0 @@
|
|||||||
//+build go1.7
|
|
||||||
|
|
||||||
package reflect2
|
|
||||||
|
|
||||||
import "unsafe"
|
|
||||||
|
|
||||||
//go:linkname resolveTypeOff reflect.resolveTypeOff
|
|
||||||
func resolveTypeOff(rtype unsafe.Pointer, off int32) unsafe.Pointer
|
|
3
vendor/github.com/modern-go/reflect2/go_above_19.go
generated
vendored
3
vendor/github.com/modern-go/reflect2/go_above_19.go
generated
vendored
@ -6,6 +6,9 @@ import (
|
|||||||
"unsafe"
|
"unsafe"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
//go:linkname resolveTypeOff reflect.resolveTypeOff
|
||||||
|
func resolveTypeOff(rtype unsafe.Pointer, off int32) unsafe.Pointer
|
||||||
|
|
||||||
//go:linkname makemap reflect.makemap
|
//go:linkname makemap reflect.makemap
|
||||||
func makemap(rtype unsafe.Pointer, cap int) (m unsafe.Pointer)
|
func makemap(rtype unsafe.Pointer, cap int) (m unsafe.Pointer)
|
||||||
|
|
||||||
|
21
vendor/github.com/modern-go/reflect2/go_below_118.go
generated
vendored
Normal file
21
vendor/github.com/modern-go/reflect2/go_below_118.go
generated
vendored
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
//+build !go1.18
|
||||||
|
|
||||||
|
package reflect2
|
||||||
|
|
||||||
|
import (
|
||||||
|
"unsafe"
|
||||||
|
)
|
||||||
|
|
||||||
|
// m escapes into the return value, but the caller of mapiterinit
|
||||||
|
// doesn't let the return value escape.
|
||||||
|
//go:noescape
|
||||||
|
//go:linkname mapiterinit reflect.mapiterinit
|
||||||
|
func mapiterinit(rtype unsafe.Pointer, m unsafe.Pointer) (val *hiter)
|
||||||
|
|
||||||
|
func (type2 *UnsafeMapType) UnsafeIterate(obj unsafe.Pointer) MapIterator {
|
||||||
|
return &UnsafeMapIterator{
|
||||||
|
hiter: mapiterinit(type2.rtype, *(*unsafe.Pointer)(obj)),
|
||||||
|
pKeyRType: type2.pKeyRType,
|
||||||
|
pElemRType: type2.pElemRType,
|
||||||
|
}
|
||||||
|
}
|
9
vendor/github.com/modern-go/reflect2/go_below_17.go
generated
vendored
9
vendor/github.com/modern-go/reflect2/go_below_17.go
generated
vendored
@ -1,9 +0,0 @@
|
|||||||
//+build !go1.7
|
|
||||||
|
|
||||||
package reflect2
|
|
||||||
|
|
||||||
import "unsafe"
|
|
||||||
|
|
||||||
func resolveTypeOff(rtype unsafe.Pointer, off int32) unsafe.Pointer {
|
|
||||||
return nil
|
|
||||||
}
|
|
14
vendor/github.com/modern-go/reflect2/go_below_19.go
generated
vendored
14
vendor/github.com/modern-go/reflect2/go_below_19.go
generated
vendored
@ -1,14 +0,0 @@
|
|||||||
//+build !go1.9
|
|
||||||
|
|
||||||
package reflect2
|
|
||||||
|
|
||||||
import (
|
|
||||||
"unsafe"
|
|
||||||
)
|
|
||||||
|
|
||||||
//go:linkname makemap reflect.makemap
|
|
||||||
func makemap(rtype unsafe.Pointer) (m unsafe.Pointer)
|
|
||||||
|
|
||||||
func makeMapWithSize(rtype unsafe.Pointer, cap int) unsafe.Pointer {
|
|
||||||
return makemap(rtype)
|
|
||||||
}
|
|
20
vendor/github.com/modern-go/reflect2/reflect2.go
generated
vendored
20
vendor/github.com/modern-go/reflect2/reflect2.go
generated
vendored
@ -1,8 +1,9 @@
|
|||||||
package reflect2
|
package reflect2
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/modern-go/concurrent"
|
|
||||||
"reflect"
|
"reflect"
|
||||||
|
"runtime"
|
||||||
|
"sync"
|
||||||
"unsafe"
|
"unsafe"
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -130,13 +131,13 @@ var ConfigSafe = Config{UseSafeImplementation: true}.Froze()
|
|||||||
|
|
||||||
type frozenConfig struct {
|
type frozenConfig struct {
|
||||||
useSafeImplementation bool
|
useSafeImplementation bool
|
||||||
cache *concurrent.Map
|
cache *sync.Map
|
||||||
}
|
}
|
||||||
|
|
||||||
func (cfg Config) Froze() *frozenConfig {
|
func (cfg Config) Froze() *frozenConfig {
|
||||||
return &frozenConfig{
|
return &frozenConfig{
|
||||||
useSafeImplementation: cfg.UseSafeImplementation,
|
useSafeImplementation: cfg.UseSafeImplementation,
|
||||||
cache: concurrent.NewMap(),
|
cache: new(sync.Map),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -288,11 +289,12 @@ func NoEscape(p unsafe.Pointer) unsafe.Pointer {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func UnsafeCastString(str string) []byte {
|
func UnsafeCastString(str string) []byte {
|
||||||
|
bytes := make([]byte, 0)
|
||||||
stringHeader := (*reflect.StringHeader)(unsafe.Pointer(&str))
|
stringHeader := (*reflect.StringHeader)(unsafe.Pointer(&str))
|
||||||
sliceHeader := &reflect.SliceHeader{
|
sliceHeader := (*reflect.SliceHeader)(unsafe.Pointer(&bytes))
|
||||||
Data: stringHeader.Data,
|
sliceHeader.Data = stringHeader.Data
|
||||||
Cap: stringHeader.Len,
|
sliceHeader.Cap = stringHeader.Len
|
||||||
Len: stringHeader.Len,
|
sliceHeader.Len = stringHeader.Len
|
||||||
}
|
runtime.KeepAlive(str)
|
||||||
return *(*[]byte)(unsafe.Pointer(sliceHeader))
|
return bytes
|
||||||
}
|
}
|
||||||
|
12
vendor/github.com/modern-go/reflect2/test.sh
generated
vendored
12
vendor/github.com/modern-go/reflect2/test.sh
generated
vendored
@ -1,12 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
set -e
|
|
||||||
echo "" > coverage.txt
|
|
||||||
|
|
||||||
for d in $(go list github.com/modern-go/reflect2-tests/... | grep -v vendor); do
|
|
||||||
go test -coverprofile=profile.out -coverpkg=github.com/modern-go/reflect2 $d
|
|
||||||
if [ -f profile.out ]; then
|
|
||||||
cat profile.out >> coverage.txt
|
|
||||||
rm profile.out
|
|
||||||
fi
|
|
||||||
done
|
|
51
vendor/github.com/modern-go/reflect2/type_map.go
generated
vendored
51
vendor/github.com/modern-go/reflect2/type_map.go
generated
vendored
@ -1,17 +1,13 @@
|
|||||||
|
// +build !gccgo
|
||||||
|
|
||||||
package reflect2
|
package reflect2
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"reflect"
|
"reflect"
|
||||||
"runtime"
|
|
||||||
"strings"
|
|
||||||
"sync"
|
"sync"
|
||||||
"unsafe"
|
"unsafe"
|
||||||
)
|
)
|
||||||
|
|
||||||
// typelinks1 for 1.5 ~ 1.6
|
|
||||||
//go:linkname typelinks1 reflect.typelinks
|
|
||||||
func typelinks1() [][]unsafe.Pointer
|
|
||||||
|
|
||||||
// typelinks2 for 1.7 ~
|
// typelinks2 for 1.7 ~
|
||||||
//go:linkname typelinks2 reflect.typelinks
|
//go:linkname typelinks2 reflect.typelinks
|
||||||
func typelinks2() (sections []unsafe.Pointer, offset [][]int32)
|
func typelinks2() (sections []unsafe.Pointer, offset [][]int32)
|
||||||
@ -27,49 +23,10 @@ func discoverTypes() {
|
|||||||
types = make(map[string]reflect.Type)
|
types = make(map[string]reflect.Type)
|
||||||
packages = make(map[string]map[string]reflect.Type)
|
packages = make(map[string]map[string]reflect.Type)
|
||||||
|
|
||||||
ver := runtime.Version()
|
loadGoTypes()
|
||||||
if ver == "go1.5" || strings.HasPrefix(ver, "go1.5.") {
|
|
||||||
loadGo15Types()
|
|
||||||
} else if ver == "go1.6" || strings.HasPrefix(ver, "go1.6.") {
|
|
||||||
loadGo15Types()
|
|
||||||
} else {
|
|
||||||
loadGo17Types()
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func loadGo15Types() {
|
func loadGoTypes() {
|
||||||
var obj interface{} = reflect.TypeOf(0)
|
|
||||||
typePtrss := typelinks1()
|
|
||||||
for _, typePtrs := range typePtrss {
|
|
||||||
for _, typePtr := range typePtrs {
|
|
||||||
(*emptyInterface)(unsafe.Pointer(&obj)).word = typePtr
|
|
||||||
typ := obj.(reflect.Type)
|
|
||||||
if typ.Kind() == reflect.Ptr && typ.Elem().Kind() == reflect.Struct {
|
|
||||||
loadedType := typ.Elem()
|
|
||||||
pkgTypes := packages[loadedType.PkgPath()]
|
|
||||||
if pkgTypes == nil {
|
|
||||||
pkgTypes = map[string]reflect.Type{}
|
|
||||||
packages[loadedType.PkgPath()] = pkgTypes
|
|
||||||
}
|
|
||||||
types[loadedType.String()] = loadedType
|
|
||||||
pkgTypes[loadedType.Name()] = loadedType
|
|
||||||
}
|
|
||||||
if typ.Kind() == reflect.Slice && typ.Elem().Kind() == reflect.Ptr &&
|
|
||||||
typ.Elem().Elem().Kind() == reflect.Struct {
|
|
||||||
loadedType := typ.Elem().Elem()
|
|
||||||
pkgTypes := packages[loadedType.PkgPath()]
|
|
||||||
if pkgTypes == nil {
|
|
||||||
pkgTypes = map[string]reflect.Type{}
|
|
||||||
packages[loadedType.PkgPath()] = pkgTypes
|
|
||||||
}
|
|
||||||
types[loadedType.String()] = loadedType
|
|
||||||
pkgTypes[loadedType.Name()] = loadedType
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
func loadGo17Types() {
|
|
||||||
var obj interface{} = reflect.TypeOf(0)
|
var obj interface{} = reflect.TypeOf(0)
|
||||||
sections, offset := typelinks2()
|
sections, offset := typelinks2()
|
||||||
for i, offs := range offset {
|
for i, offs := range offset {
|
||||||
|
26
vendor/github.com/modern-go/reflect2/unsafe_link.go
generated
vendored
26
vendor/github.com/modern-go/reflect2/unsafe_link.go
generated
vendored
@ -19,18 +19,12 @@ func typedslicecopy(elemType unsafe.Pointer, dst, src sliceHeader) int
|
|||||||
|
|
||||||
//go:linkname mapassign reflect.mapassign
|
//go:linkname mapassign reflect.mapassign
|
||||||
//go:noescape
|
//go:noescape
|
||||||
func mapassign(rtype unsafe.Pointer, m unsafe.Pointer, key, val unsafe.Pointer)
|
func mapassign(rtype unsafe.Pointer, m unsafe.Pointer, key unsafe.Pointer, val unsafe.Pointer)
|
||||||
|
|
||||||
//go:linkname mapaccess reflect.mapaccess
|
//go:linkname mapaccess reflect.mapaccess
|
||||||
//go:noescape
|
//go:noescape
|
||||||
func mapaccess(rtype unsafe.Pointer, m unsafe.Pointer, key unsafe.Pointer) (val unsafe.Pointer)
|
func mapaccess(rtype unsafe.Pointer, m unsafe.Pointer, key unsafe.Pointer) (val unsafe.Pointer)
|
||||||
|
|
||||||
// m escapes into the return value, but the caller of mapiterinit
|
|
||||||
// doesn't let the return value escape.
|
|
||||||
//go:noescape
|
|
||||||
//go:linkname mapiterinit reflect.mapiterinit
|
|
||||||
func mapiterinit(rtype unsafe.Pointer, m unsafe.Pointer) *hiter
|
|
||||||
|
|
||||||
//go:noescape
|
//go:noescape
|
||||||
//go:linkname mapiternext reflect.mapiternext
|
//go:linkname mapiternext reflect.mapiternext
|
||||||
func mapiternext(it *hiter)
|
func mapiternext(it *hiter)
|
||||||
@ -42,9 +36,21 @@ func ifaceE2I(rtype unsafe.Pointer, src interface{}, dst unsafe.Pointer)
|
|||||||
// If you modify hiter, also change cmd/internal/gc/reflect.go to indicate
|
// If you modify hiter, also change cmd/internal/gc/reflect.go to indicate
|
||||||
// the layout of this structure.
|
// the layout of this structure.
|
||||||
type hiter struct {
|
type hiter struct {
|
||||||
key unsafe.Pointer // Must be in first position. Write nil to indicate iteration end (see cmd/internal/gc/range.go).
|
key unsafe.Pointer
|
||||||
value unsafe.Pointer // Must be in second position (see cmd/internal/gc/range.go).
|
value unsafe.Pointer
|
||||||
// rest fields are ignored
|
t unsafe.Pointer
|
||||||
|
h unsafe.Pointer
|
||||||
|
buckets unsafe.Pointer
|
||||||
|
bptr unsafe.Pointer
|
||||||
|
overflow *[]unsafe.Pointer
|
||||||
|
oldoverflow *[]unsafe.Pointer
|
||||||
|
startBucket uintptr
|
||||||
|
offset uint8
|
||||||
|
wrapped bool
|
||||||
|
B uint8
|
||||||
|
i uint8
|
||||||
|
bucket uintptr
|
||||||
|
checkBucket uintptr
|
||||||
}
|
}
|
||||||
|
|
||||||
// add returns p+x.
|
// add returns p+x.
|
||||||
|
8
vendor/github.com/modern-go/reflect2/unsafe_map.go
generated
vendored
8
vendor/github.com/modern-go/reflect2/unsafe_map.go
generated
vendored
@ -107,14 +107,6 @@ func (type2 *UnsafeMapType) Iterate(obj interface{}) MapIterator {
|
|||||||
return type2.UnsafeIterate(objEFace.data)
|
return type2.UnsafeIterate(objEFace.data)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (type2 *UnsafeMapType) UnsafeIterate(obj unsafe.Pointer) MapIterator {
|
|
||||||
return &UnsafeMapIterator{
|
|
||||||
hiter: mapiterinit(type2.rtype, *(*unsafe.Pointer)(obj)),
|
|
||||||
pKeyRType: type2.pKeyRType,
|
|
||||||
pElemRType: type2.pElemRType,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
type UnsafeMapIterator struct {
|
type UnsafeMapIterator struct {
|
||||||
*hiter
|
*hiter
|
||||||
pKeyRType unsafe.Pointer
|
pKeyRType unsafe.Pointer
|
||||||
|
4
vendor/modules.txt
vendored
4
vendor/modules.txt
vendored
@ -404,7 +404,7 @@ github.com/inconshreveable/mousetrap
|
|||||||
github.com/ishidawataru/sctp
|
github.com/ishidawataru/sctp
|
||||||
# github.com/jinzhu/copier v0.3.2
|
# github.com/jinzhu/copier v0.3.2
|
||||||
github.com/jinzhu/copier
|
github.com/jinzhu/copier
|
||||||
# github.com/json-iterator/go v1.1.11
|
# github.com/json-iterator/go v1.1.12
|
||||||
github.com/json-iterator/go
|
github.com/json-iterator/go
|
||||||
# github.com/juju/ansiterm v0.0.0-20180109212912-720a0952cc2a
|
# github.com/juju/ansiterm v0.0.0-20180109212912-720a0952cc2a
|
||||||
github.com/juju/ansiterm
|
github.com/juju/ansiterm
|
||||||
@ -450,7 +450,7 @@ github.com/moby/term
|
|||||||
github.com/moby/term/windows
|
github.com/moby/term/windows
|
||||||
# github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd
|
# github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd
|
||||||
github.com/modern-go/concurrent
|
github.com/modern-go/concurrent
|
||||||
# github.com/modern-go/reflect2 v1.0.1
|
# github.com/modern-go/reflect2 v1.0.2
|
||||||
github.com/modern-go/reflect2
|
github.com/modern-go/reflect2
|
||||||
# github.com/morikuni/aec v1.0.0
|
# github.com/morikuni/aec v1.0.0
|
||||||
github.com/morikuni/aec
|
github.com/morikuni/aec
|
||||||
|
Reference in New Issue
Block a user