Merge pull request #880 from thaJeztah/align_dependencies_to_tags
Use tagged versions for dependencies where possible
This commit is contained in:
commit
a3af7393fe
18
vendor.conf
18
vendor.conf
@ -1,6 +1,6 @@
|
|||||||
github.com/beorn7/perks 4c0e84591b9aa9e6dcfdf3e020114cd81f89d5f9
|
github.com/beorn7/perks 4c0e84591b9aa9e6dcfdf3e020114cd81f89d5f9
|
||||||
github.com/blang/semver v3.1.0
|
github.com/blang/semver v3.1.0
|
||||||
github.com/boltdb/bolt e9cf4fae01b5a8ff89d0ec6b32f0d9c9f79aefdd
|
github.com/boltdb/bolt v1.3.1
|
||||||
github.com/BurntSushi/toml a368813c5e648fee92e5f6c30e3944ff9d5e8895
|
github.com/BurntSushi/toml a368813c5e648fee92e5f6c30e3944ff9d5e8895
|
||||||
github.com/containerd/cgroups 5e610833b72089b37d0e615de9a92dfc043757c2
|
github.com/containerd/cgroups 5e610833b72089b37d0e615de9a92dfc043757c2
|
||||||
github.com/containerd/console 4d8a41f4ce5b9bae77c41786ea2458330f43f081
|
github.com/containerd/console 4d8a41f4ce5b9bae77c41786ea2458330f43f081
|
||||||
@ -13,7 +13,7 @@ github.com/containerd/ttrpc 94dde388801693c54f88a6596f713b51a8b30b2d
|
|||||||
github.com/containerd/typeurl a93fcdb778cd272c6e9b3028b2f42d813e785d40
|
github.com/containerd/typeurl a93fcdb778cd272c6e9b3028b2f42d813e785d40
|
||||||
github.com/containernetworking/cni v0.6.0
|
github.com/containernetworking/cni v0.6.0
|
||||||
github.com/containernetworking/plugins v0.7.0
|
github.com/containernetworking/plugins v0.7.0
|
||||||
github.com/coreos/go-systemd 48702e0da86bd25e76cfef347e2adeb434a0d0a6
|
github.com/coreos/go-systemd v14
|
||||||
github.com/davecgh/go-spew v1.1.0
|
github.com/davecgh/go-spew v1.1.0
|
||||||
github.com/docker/distribution b38e5838b7b2f2ad48e06ec4b500011976080621
|
github.com/docker/distribution b38e5838b7b2f2ad48e06ec4b500011976080621
|
||||||
github.com/docker/docker 86f080cff0914e9694068ed78d503701667c4c00
|
github.com/docker/docker 86f080cff0914e9694068ed78d503701667c4c00
|
||||||
@ -21,23 +21,23 @@ github.com/docker/go-events 9461782956ad83b30282bf90e31fa6a70c255ba9
|
|||||||
github.com/docker/go-metrics 4ea375f7759c82740c893fc030bc37088d2ec098
|
github.com/docker/go-metrics 4ea375f7759c82740c893fc030bc37088d2ec098
|
||||||
github.com/docker/go-units v0.3.1
|
github.com/docker/go-units v0.3.1
|
||||||
github.com/docker/spdystream 449fdfce4d962303d702fec724ef0ad181c92528
|
github.com/docker/spdystream 449fdfce4d962303d702fec724ef0ad181c92528
|
||||||
github.com/emicklei/go-restful ff4f55a206334ef123e4f79bbf348980da81ca46
|
github.com/emicklei/go-restful v2.2.1
|
||||||
github.com/ghodss/yaml 73d445a93680fa1a78ae23a5839bad48f32ba1ee
|
github.com/ghodss/yaml v1.0.0
|
||||||
github.com/godbus/dbus c7fdd8b5cd55e87b4e1f4e372cdb1db61dd6c66f
|
github.com/godbus/dbus v3
|
||||||
github.com/gogo/googleapis 08a7655d27152912db7aaf4f983275eaf8d128ef
|
github.com/gogo/googleapis 08a7655d27152912db7aaf4f983275eaf8d128ef
|
||||||
github.com/gogo/protobuf v1.0.0
|
github.com/gogo/protobuf v1.0.0
|
||||||
github.com/golang/glog 44145f04b68cf362d9c4df2182967c2275eaefed
|
github.com/golang/glog 44145f04b68cf362d9c4df2182967c2275eaefed
|
||||||
github.com/golang/protobuf v1.1.0
|
github.com/golang/protobuf v1.1.0
|
||||||
github.com/google/gofuzz 44d81051d367757e1c7c6a5a86423ece9afcf63c
|
github.com/google/gofuzz 44d81051d367757e1c7c6a5a86423ece9afcf63c
|
||||||
github.com/grpc-ecosystem/go-grpc-prometheus 6b7015e65d366bf3f19b2b2a000a831940f0f7e0
|
github.com/grpc-ecosystem/go-grpc-prometheus v1.1
|
||||||
github.com/hashicorp/errwrap 7554cd9344cec97297fa6649b055a8c98c2a1e55
|
github.com/hashicorp/errwrap 7554cd9344cec97297fa6649b055a8c98c2a1e55
|
||||||
github.com/hashicorp/go-multierror ed905158d87462226a13fe39ddf685ea65f1c11f
|
github.com/hashicorp/go-multierror ed905158d87462226a13fe39ddf685ea65f1c11f
|
||||||
github.com/json-iterator/go f2b4162afba35581b6d4a50d3b8f34e33c144682
|
github.com/json-iterator/go 1.1.5
|
||||||
github.com/matttproud/golang_protobuf_extensions v1.0.0
|
github.com/matttproud/golang_protobuf_extensions v1.0.0
|
||||||
github.com/Microsoft/go-winio v0.4.7
|
github.com/Microsoft/go-winio v0.4.7
|
||||||
github.com/Microsoft/hcsshim v0.6.11
|
github.com/Microsoft/hcsshim v0.6.11
|
||||||
github.com/modern-go/concurrent 1.0.3
|
github.com/modern-go/concurrent 1.0.3
|
||||||
github.com/modern-go/reflect2 05fbef0ca5da472bbf96c9322b84a53edc03c9fd
|
github.com/modern-go/reflect2 1.0.1
|
||||||
github.com/opencontainers/go-digest c9281466c8b2f606084ac71339773efd177436e7
|
github.com/opencontainers/go-digest c9281466c8b2f606084ac71339773efd177436e7
|
||||||
github.com/opencontainers/image-spec v1.0.1
|
github.com/opencontainers/image-spec v1.0.1
|
||||||
github.com/opencontainers/runc 69663f0bd4b60df09991c08812a60108003fa340
|
github.com/opencontainers/runc 69663f0bd4b60df09991c08812a60108003fa340
|
||||||
@ -54,7 +54,7 @@ github.com/seccomp/libseccomp-golang 32f571b70023028bd57d9288c20efbcb237f3ce0
|
|||||||
github.com/sirupsen/logrus v1.0.0
|
github.com/sirupsen/logrus v1.0.0
|
||||||
github.com/stretchr/testify v1.1.4
|
github.com/stretchr/testify v1.1.4
|
||||||
github.com/syndtr/gocapability db04d3cc01c8b54962a58ec7e491717d06cfcc16
|
github.com/syndtr/gocapability db04d3cc01c8b54962a58ec7e491717d06cfcc16
|
||||||
github.com/tchap/go-patricia 5ad6cdb7538b0097d5598c7e57f0a24072adf7dc
|
github.com/tchap/go-patricia v2.2.6
|
||||||
github.com/urfave/cli 7bc6a0acffa589f415f88aca16cc1de5ffd66f9c
|
github.com/urfave/cli 7bc6a0acffa589f415f88aca16cc1de5ffd66f9c
|
||||||
github.com/xeipuuv/gojsonpointer 4e3ac2762d5f479393488629ee9370b50873b3a6
|
github.com/xeipuuv/gojsonpointer 4e3ac2762d5f479393488629ee9370b50873b3a6
|
||||||
github.com/xeipuuv/gojsonreference bd5ef7bd5415a7ac448318e64f11a24cd21e594b
|
github.com/xeipuuv/gojsonreference bd5ef7bd5415a7ac448318e64f11a24cd21e594b
|
||||||
|
1
vendor/github.com/boltdb/bolt/README.md
generated
vendored
1
vendor/github.com/boltdb/bolt/README.md
generated
vendored
@ -911,5 +911,6 @@ Below is a list of public, open source projects that use Bolt:
|
|||||||
* [dcrwallet](https://github.com/decred/dcrwallet) - A wallet for the Decred cryptocurrency.
|
* [dcrwallet](https://github.com/decred/dcrwallet) - A wallet for the Decred cryptocurrency.
|
||||||
* [Ironsmith](https://github.com/timshannon/ironsmith) - A simple, script-driven continuous integration (build - > test -> release) tool, with no external dependencies
|
* [Ironsmith](https://github.com/timshannon/ironsmith) - A simple, script-driven continuous integration (build - > test -> release) tool, with no external dependencies
|
||||||
* [BoltHold](https://github.com/timshannon/bolthold) - An embeddable NoSQL store for Go types built on BoltDB
|
* [BoltHold](https://github.com/timshannon/bolthold) - An embeddable NoSQL store for Go types built on BoltDB
|
||||||
|
* [Ponzu CMS](https://ponzu-cms.org) - Headless CMS + automatic JSON API with auto-HTTPS, HTTP/2 Server Push, and flexible server framework.
|
||||||
|
|
||||||
If you are using Bolt in a project please send a pull request to add it to the list.
|
If you are using Bolt in a project please send a pull request to add it to the list.
|
||||||
|
1
vendor/github.com/emicklei/go-restful/README.md
generated
vendored
1
vendor/github.com/emicklei/go-restful/README.md
generated
vendored
@ -67,6 +67,7 @@ func (u UserResource) findUser(request *restful.Request, response *restful.Respo
|
|||||||
- [Example posted on blog](http://ernestmicklei.com/2012/11/go-restful-first-working-example/)
|
- [Example posted on blog](http://ernestmicklei.com/2012/11/go-restful-first-working-example/)
|
||||||
- [Design explained on blog](http://ernestmicklei.com/2012/11/go-restful-api-design/)
|
- [Design explained on blog](http://ernestmicklei.com/2012/11/go-restful-api-design/)
|
||||||
- [sourcegraph](https://sourcegraph.com/github.com/emicklei/go-restful)
|
- [sourcegraph](https://sourcegraph.com/github.com/emicklei/go-restful)
|
||||||
|
- [showcase: Zazkia - tcp proxy for testing resiliency](https://github.com/emicklei/zazkia)
|
||||||
- [showcase: Mora - MongoDB REST Api server](https://github.com/emicklei/mora)
|
- [showcase: Mora - MongoDB REST Api server](https://github.com/emicklei/mora)
|
||||||
|
|
||||||
Type ```git shortlog -s``` for a full list of contributors.
|
Type ```git shortlog -s``` for a full list of contributors.
|
||||||
|
8
vendor/github.com/emicklei/go-restful/compressors.go
generated
vendored
8
vendor/github.com/emicklei/go-restful/compressors.go
generated
vendored
@ -15,20 +15,20 @@ type CompressorProvider interface {
|
|||||||
// Before using it, call Reset().
|
// Before using it, call Reset().
|
||||||
AcquireGzipWriter() *gzip.Writer
|
AcquireGzipWriter() *gzip.Writer
|
||||||
|
|
||||||
// Releases an aqcuired *gzip.Writer.
|
// Releases an acquired *gzip.Writer.
|
||||||
ReleaseGzipWriter(w *gzip.Writer)
|
ReleaseGzipWriter(w *gzip.Writer)
|
||||||
|
|
||||||
// Returns a *gzip.Reader which needs to be released later.
|
// Returns a *gzip.Reader which needs to be released later.
|
||||||
AcquireGzipReader() *gzip.Reader
|
AcquireGzipReader() *gzip.Reader
|
||||||
|
|
||||||
// Releases an aqcuired *gzip.Reader.
|
// Releases an acquired *gzip.Reader.
|
||||||
ReleaseGzipReader(w *gzip.Reader)
|
ReleaseGzipReader(w *gzip.Reader)
|
||||||
|
|
||||||
// Returns a *zlib.Writer which needs to be released later.
|
// Returns a *zlib.Writer which needs to be released later.
|
||||||
// Before using it, call Reset().
|
// Before using it, call Reset().
|
||||||
AcquireZlibWriter() *zlib.Writer
|
AcquireZlibWriter() *zlib.Writer
|
||||||
|
|
||||||
// Releases an aqcuired *zlib.Writer.
|
// Releases an acquired *zlib.Writer.
|
||||||
ReleaseZlibWriter(w *zlib.Writer)
|
ReleaseZlibWriter(w *zlib.Writer)
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -45,7 +45,7 @@ func CurrentCompressorProvider() CompressorProvider {
|
|||||||
return currentCompressorProvider
|
return currentCompressorProvider
|
||||||
}
|
}
|
||||||
|
|
||||||
// CompressorProvider sets the actual provider of compressors (zlib or gzip).
|
// SetCompressorProvider sets the actual provider of compressors (zlib or gzip).
|
||||||
func SetCompressorProvider(p CompressorProvider) {
|
func SetCompressorProvider(p CompressorProvider) {
|
||||||
if p == nil {
|
if p == nil {
|
||||||
panic("cannot set compressor provider to nil")
|
panic("cannot set compressor provider to nil")
|
||||||
|
2
vendor/github.com/emicklei/go-restful/container.go
generated
vendored
2
vendor/github.com/emicklei/go-restful/container.go
generated
vendored
@ -140,7 +140,7 @@ func (c *Container) addHandler(service *WebService, serveMux *http.ServeMux) boo
|
|||||||
func (c *Container) Remove(ws *WebService) error {
|
func (c *Container) Remove(ws *WebService) error {
|
||||||
if c.ServeMux == http.DefaultServeMux {
|
if c.ServeMux == http.DefaultServeMux {
|
||||||
errMsg := fmt.Sprintf("[restful] cannot remove a WebService from a Container using the DefaultServeMux: ['%v']", ws)
|
errMsg := fmt.Sprintf("[restful] cannot remove a WebService from a Container using the DefaultServeMux: ['%v']", ws)
|
||||||
log.Printf(errMsg)
|
log.Print(errMsg)
|
||||||
return errors.New(errMsg)
|
return errors.New(errMsg)
|
||||||
}
|
}
|
||||||
c.webServicesLock.Lock()
|
c.webServicesLock.Lock()
|
||||||
|
2
vendor/github.com/emicklei/go-restful/logger.go
generated
vendored
2
vendor/github.com/emicklei/go-restful/logger.go
generated
vendored
@ -21,7 +21,7 @@ func TraceLogger(logger log.StdLogger) {
|
|||||||
EnableTracing(logger != nil)
|
EnableTracing(logger != nil)
|
||||||
}
|
}
|
||||||
|
|
||||||
// expose the setter for the global logger on the top-level package
|
// SetLogger exposes the setter for the global logger on the top-level package
|
||||||
func SetLogger(customLogger log.StdLogger) {
|
func SetLogger(customLogger log.StdLogger) {
|
||||||
log.SetLogger(customLogger)
|
log.SetLogger(customLogger)
|
||||||
}
|
}
|
||||||
|
2
vendor/github.com/emicklei/go-restful/response.go
generated
vendored
2
vendor/github.com/emicklei/go-restful/response.go
generated
vendored
@ -21,7 +21,7 @@ type Response struct {
|
|||||||
http.ResponseWriter
|
http.ResponseWriter
|
||||||
requestAccept string // mime-type what the Http Request says it wants to receive
|
requestAccept string // mime-type what the Http Request says it wants to receive
|
||||||
routeProduces []string // mime-types what the Route says it can produce
|
routeProduces []string // mime-types what the Route says it can produce
|
||||||
statusCode int // HTTP status code that has been written explicity (if zero then net/http has written 200)
|
statusCode int // HTTP status code that has been written explicitly (if zero then net/http has written 200)
|
||||||
contentLength int // number of bytes written for the response body
|
contentLength int // number of bytes written for the response body
|
||||||
prettyPrint bool // controls the indentation feature of XML and JSON serialization. It is initialized using var PrettyPrintResponses.
|
prettyPrint bool // controls the indentation feature of XML and JSON serialization. It is initialized using var PrettyPrintResponses.
|
||||||
err error // err property is kept when WriteError is called
|
err error // err property is kept when WriteError is called
|
||||||
|
2
vendor/github.com/emicklei/go-restful/route.go
generated
vendored
2
vendor/github.com/emicklei/go-restful/route.go
generated
vendored
@ -100,7 +100,7 @@ func (r Route) matchesContentType(mimeTypes string) bool {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if len(mimeTypes) == 0 {
|
if len(mimeTypes) == 0 {
|
||||||
// idempotent methods with (most-likely or garanteed) empty content match missing Content-Type
|
// idempotent methods with (most-likely or guaranteed) empty content match missing Content-Type
|
||||||
m := r.Method
|
m := r.Method
|
||||||
if m == "GET" || m == "HEAD" || m == "OPTIONS" || m == "DELETE" || m == "TRACE" {
|
if m == "GET" || m == "HEAD" || m == "OPTIONS" || m == "DELETE" || m == "TRACE" {
|
||||||
return true
|
return true
|
||||||
|
2
vendor/github.com/emicklei/go-restful/route_builder.go
generated
vendored
2
vendor/github.com/emicklei/go-restful/route_builder.go
generated
vendored
@ -89,7 +89,7 @@ func (b *RouteBuilder) Doc(documentation string) *RouteBuilder {
|
|||||||
return b
|
return b
|
||||||
}
|
}
|
||||||
|
|
||||||
// A verbose explanation of the operation behavior. Optional.
|
// Notes is a verbose explanation of the operation behavior. Optional.
|
||||||
func (b *RouteBuilder) Notes(notes string) *RouteBuilder {
|
func (b *RouteBuilder) Notes(notes string) *RouteBuilder {
|
||||||
b.notes = notes
|
b.notes = notes
|
||||||
return b
|
return b
|
||||||
|
2
vendor/github.com/emicklei/go-restful/web_service.go
generated
vendored
2
vendor/github.com/emicklei/go-restful/web_service.go
generated
vendored
@ -233,7 +233,7 @@ func (w *WebService) RootPath() string {
|
|||||||
return w.rootPath
|
return w.rootPath
|
||||||
}
|
}
|
||||||
|
|
||||||
// PathParameters return the path parameter names for (shared amoung its Routes)
|
// PathParameters return the path parameter names for (shared among its Routes)
|
||||||
func (w *WebService) PathParameters() []*Parameter {
|
func (w *WebService) PathParameters() []*Parameter {
|
||||||
return w.pathParameters
|
return w.pathParameters
|
||||||
}
|
}
|
||||||
|
15
vendor/github.com/ghodss/yaml/README.md
generated
vendored
15
vendor/github.com/ghodss/yaml/README.md
generated
vendored
@ -10,7 +10,7 @@ In short, this library first converts YAML to JSON using go-yaml and then uses `
|
|||||||
|
|
||||||
## Compatibility
|
## Compatibility
|
||||||
|
|
||||||
This package uses [go-yaml v2](https://github.com/go-yaml/yaml) and therefore supports [everything go-yaml supports](https://github.com/go-yaml/yaml#compatibility).
|
This package uses [go-yaml](https://github.com/go-yaml/yaml) and therefore supports [everything go-yaml supports](https://github.com/go-yaml/yaml#compatibility).
|
||||||
|
|
||||||
## Caveats
|
## Caveats
|
||||||
|
|
||||||
@ -44,6 +44,8 @@ import "github.com/ghodss/yaml"
|
|||||||
Usage is very similar to the JSON library:
|
Usage is very similar to the JSON library:
|
||||||
|
|
||||||
```go
|
```go
|
||||||
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
@ -51,8 +53,8 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
type Person struct {
|
type Person struct {
|
||||||
Name string `json:"name"` // Affects YAML field names too.
|
Name string `json:"name"` // Affects YAML field names too.
|
||||||
Age int `json:"name"`
|
Age int `json:"age"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
@ -65,13 +67,13 @@ func main() {
|
|||||||
}
|
}
|
||||||
fmt.Println(string(y))
|
fmt.Println(string(y))
|
||||||
/* Output:
|
/* Output:
|
||||||
name: John
|
|
||||||
age: 30
|
age: 30
|
||||||
|
name: John
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// Unmarshal the YAML back into a Person struct.
|
// Unmarshal the YAML back into a Person struct.
|
||||||
var p2 Person
|
var p2 Person
|
||||||
err := yaml.Unmarshal(y, &p2)
|
err = yaml.Unmarshal(y, &p2)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
fmt.Printf("err: %v\n", err)
|
fmt.Printf("err: %v\n", err)
|
||||||
return
|
return
|
||||||
@ -86,11 +88,14 @@ func main() {
|
|||||||
`yaml.YAMLToJSON` and `yaml.JSONToYAML` methods are also available:
|
`yaml.YAMLToJSON` and `yaml.JSONToYAML` methods are also available:
|
||||||
|
|
||||||
```go
|
```go
|
||||||
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
"github.com/ghodss/yaml"
|
"github.com/ghodss/yaml"
|
||||||
)
|
)
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
j := []byte(`{"name": "John", "age": 30}`)
|
j := []byte(`{"name": "John", "age": 30}`)
|
||||||
y, err := yaml.JSONToYAML(j)
|
y, err := yaml.JSONToYAML(j)
|
||||||
|
6
vendor/github.com/ghodss/yaml/fields.go
generated
vendored
6
vendor/github.com/ghodss/yaml/fields.go
generated
vendored
@ -45,7 +45,11 @@ func indirect(v reflect.Value, decodingNull bool) (json.Unmarshaler, encoding.Te
|
|||||||
break
|
break
|
||||||
}
|
}
|
||||||
if v.IsNil() {
|
if v.IsNil() {
|
||||||
v.Set(reflect.New(v.Type().Elem()))
|
if v.CanSet() {
|
||||||
|
v.Set(reflect.New(v.Type().Elem()))
|
||||||
|
} else {
|
||||||
|
v = reflect.New(v.Type().Elem())
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if v.Type().NumMethod() > 0 {
|
if v.Type().NumMethod() > 0 {
|
||||||
if u, ok := v.Interface().(json.Unmarshaler); ok {
|
if u, ok := v.Interface().(json.Unmarshaler); ok {
|
||||||
|
6
vendor/github.com/ghodss/yaml/yaml.go
generated
vendored
6
vendor/github.com/ghodss/yaml/yaml.go
generated
vendored
@ -15,12 +15,12 @@ import (
|
|||||||
func Marshal(o interface{}) ([]byte, error) {
|
func Marshal(o interface{}) ([]byte, error) {
|
||||||
j, err := json.Marshal(o)
|
j, err := json.Marshal(o)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, fmt.Errorf("error marshaling into JSON: ", err)
|
return nil, fmt.Errorf("error marshaling into JSON: %v", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
y, err := JSONToYAML(j)
|
y, err := JSONToYAML(j)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, fmt.Errorf("error converting JSON to YAML: ", err)
|
return nil, fmt.Errorf("error converting JSON to YAML: %v", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
return y, nil
|
return y, nil
|
||||||
@ -48,7 +48,7 @@ func JSONToYAML(j []byte) ([]byte, error) {
|
|||||||
var jsonObj interface{}
|
var jsonObj interface{}
|
||||||
// We are using yaml.Unmarshal here (instead of json.Unmarshal) because the
|
// We are using yaml.Unmarshal here (instead of json.Unmarshal) because the
|
||||||
// Go JSON library doesn't try to pick the right number type (int, float,
|
// Go JSON library doesn't try to pick the right number type (int, float,
|
||||||
// etc.) when unmarshling to interface{}, it just picks float64
|
// etc.) when unmarshalling to interface{}, it just picks float64
|
||||||
// universally. go-yaml does go through the effort of picking the right
|
// universally. go-yaml does go through the effort of picking the right
|
||||||
// number type, so we can preserve number type throughout this process.
|
// number type, so we can preserve number type throughout this process.
|
||||||
err := yaml.Unmarshal(j, &jsonObj)
|
err := yaml.Unmarshal(j, &jsonObj)
|
||||||
|
16
vendor/github.com/json-iterator/go/adapter.go
generated
vendored
16
vendor/github.com/json-iterator/go/adapter.go
generated
vendored
@ -81,10 +81,12 @@ func (adapter *Decoder) More() bool {
|
|||||||
if iter.Error != nil {
|
if iter.Error != nil {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
if iter.head != iter.tail {
|
c := iter.nextToken()
|
||||||
return true
|
if c == 0 {
|
||||||
|
return false
|
||||||
}
|
}
|
||||||
return iter.loadMore()
|
iter.unreadByte()
|
||||||
|
return c != ']' && c != '}'
|
||||||
}
|
}
|
||||||
|
|
||||||
// Buffered remaining buffer
|
// Buffered remaining buffer
|
||||||
@ -98,7 +100,7 @@ func (adapter *Decoder) Buffered() io.Reader {
|
|||||||
func (adapter *Decoder) UseNumber() {
|
func (adapter *Decoder) UseNumber() {
|
||||||
cfg := adapter.iter.cfg.configBeforeFrozen
|
cfg := adapter.iter.cfg.configBeforeFrozen
|
||||||
cfg.UseNumber = true
|
cfg.UseNumber = true
|
||||||
adapter.iter.cfg = cfg.frozeWithCacheReuse()
|
adapter.iter.cfg = cfg.frozeWithCacheReuse(adapter.iter.cfg.extraExtensions)
|
||||||
}
|
}
|
||||||
|
|
||||||
// DisallowUnknownFields causes the Decoder to return an error when the destination
|
// DisallowUnknownFields causes the Decoder to return an error when the destination
|
||||||
@ -107,7 +109,7 @@ func (adapter *Decoder) UseNumber() {
|
|||||||
func (adapter *Decoder) DisallowUnknownFields() {
|
func (adapter *Decoder) DisallowUnknownFields() {
|
||||||
cfg := adapter.iter.cfg.configBeforeFrozen
|
cfg := adapter.iter.cfg.configBeforeFrozen
|
||||||
cfg.DisallowUnknownFields = true
|
cfg.DisallowUnknownFields = true
|
||||||
adapter.iter.cfg = cfg.frozeWithCacheReuse()
|
adapter.iter.cfg = cfg.frozeWithCacheReuse(adapter.iter.cfg.extraExtensions)
|
||||||
}
|
}
|
||||||
|
|
||||||
// NewEncoder same as json.NewEncoder
|
// NewEncoder same as json.NewEncoder
|
||||||
@ -132,14 +134,14 @@ func (adapter *Encoder) Encode(val interface{}) error {
|
|||||||
func (adapter *Encoder) SetIndent(prefix, indent string) {
|
func (adapter *Encoder) SetIndent(prefix, indent string) {
|
||||||
config := adapter.stream.cfg.configBeforeFrozen
|
config := adapter.stream.cfg.configBeforeFrozen
|
||||||
config.IndentionStep = len(indent)
|
config.IndentionStep = len(indent)
|
||||||
adapter.stream.cfg = config.frozeWithCacheReuse()
|
adapter.stream.cfg = config.frozeWithCacheReuse(adapter.stream.cfg.extraExtensions)
|
||||||
}
|
}
|
||||||
|
|
||||||
// SetEscapeHTML escape html by default, set to false to disable
|
// SetEscapeHTML escape html by default, set to false to disable
|
||||||
func (adapter *Encoder) SetEscapeHTML(escapeHTML bool) {
|
func (adapter *Encoder) SetEscapeHTML(escapeHTML bool) {
|
||||||
config := adapter.stream.cfg.configBeforeFrozen
|
config := adapter.stream.cfg.configBeforeFrozen
|
||||||
config.EscapeHTML = escapeHTML
|
config.EscapeHTML = escapeHTML
|
||||||
adapter.stream.cfg = config.frozeWithCacheReuse()
|
adapter.stream.cfg = config.frozeWithCacheReuse(adapter.stream.cfg.extraExtensions)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Valid reports whether data is a valid JSON encoding.
|
// Valid reports whether data is a valid JSON encoding.
|
||||||
|
25
vendor/github.com/json-iterator/go/config.go
generated
vendored
25
vendor/github.com/json-iterator/go/config.go
generated
vendored
@ -74,7 +74,9 @@ type frozenConfig struct {
|
|||||||
disallowUnknownFields bool
|
disallowUnknownFields bool
|
||||||
decoderCache *concurrent.Map
|
decoderCache *concurrent.Map
|
||||||
encoderCache *concurrent.Map
|
encoderCache *concurrent.Map
|
||||||
extensions []Extension
|
encoderExtension Extension
|
||||||
|
decoderExtension Extension
|
||||||
|
extraExtensions []Extension
|
||||||
streamPool *sync.Pool
|
streamPool *sync.Pool
|
||||||
iteratorPool *sync.Pool
|
iteratorPool *sync.Pool
|
||||||
caseSensitive bool
|
caseSensitive bool
|
||||||
@ -158,22 +160,21 @@ func (cfg Config) Froze() API {
|
|||||||
if cfg.ValidateJsonRawMessage {
|
if cfg.ValidateJsonRawMessage {
|
||||||
api.validateJsonRawMessage(encoderExtension)
|
api.validateJsonRawMessage(encoderExtension)
|
||||||
}
|
}
|
||||||
if len(encoderExtension) > 0 {
|
api.encoderExtension = encoderExtension
|
||||||
api.extensions = append(api.extensions, encoderExtension)
|
api.decoderExtension = decoderExtension
|
||||||
}
|
|
||||||
if len(decoderExtension) > 0 {
|
|
||||||
api.extensions = append(api.extensions, decoderExtension)
|
|
||||||
}
|
|
||||||
api.configBeforeFrozen = cfg
|
api.configBeforeFrozen = cfg
|
||||||
return api
|
return api
|
||||||
}
|
}
|
||||||
|
|
||||||
func (cfg Config) frozeWithCacheReuse() *frozenConfig {
|
func (cfg Config) frozeWithCacheReuse(extraExtensions []Extension) *frozenConfig {
|
||||||
api := getFrozenConfigFromCache(cfg)
|
api := getFrozenConfigFromCache(cfg)
|
||||||
if api != nil {
|
if api != nil {
|
||||||
return api
|
return api
|
||||||
}
|
}
|
||||||
api = cfg.Froze().(*frozenConfig)
|
api = cfg.Froze().(*frozenConfig)
|
||||||
|
for _, extension := range extraExtensions {
|
||||||
|
api.RegisterExtension(extension)
|
||||||
|
}
|
||||||
addFrozenConfigToCache(cfg, api)
|
addFrozenConfigToCache(cfg, api)
|
||||||
return api
|
return api
|
||||||
}
|
}
|
||||||
@ -190,7 +191,7 @@ func (cfg *frozenConfig) validateJsonRawMessage(extension EncoderExtension) {
|
|||||||
stream.WriteRaw(string(rawMessage))
|
stream.WriteRaw(string(rawMessage))
|
||||||
}
|
}
|
||||||
}, func(ptr unsafe.Pointer) bool {
|
}, func(ptr unsafe.Pointer) bool {
|
||||||
return false
|
return len(*((*json.RawMessage)(ptr))) == 0
|
||||||
}}
|
}}
|
||||||
extension[reflect2.TypeOfPtr((*json.RawMessage)(nil)).Elem()] = encoder
|
extension[reflect2.TypeOfPtr((*json.RawMessage)(nil)).Elem()] = encoder
|
||||||
extension[reflect2.TypeOfPtr((*RawMessage)(nil)).Elem()] = encoder
|
extension[reflect2.TypeOfPtr((*RawMessage)(nil)).Elem()] = encoder
|
||||||
@ -219,7 +220,9 @@ func (cfg *frozenConfig) getTagKey() string {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (cfg *frozenConfig) RegisterExtension(extension Extension) {
|
func (cfg *frozenConfig) RegisterExtension(extension Extension) {
|
||||||
cfg.extensions = append(cfg.extensions, extension)
|
cfg.extraExtensions = append(cfg.extraExtensions, extension)
|
||||||
|
copied := cfg.configBeforeFrozen
|
||||||
|
cfg.configBeforeFrozen = copied
|
||||||
}
|
}
|
||||||
|
|
||||||
type lossyFloat32Encoder struct {
|
type lossyFloat32Encoder struct {
|
||||||
@ -314,7 +317,7 @@ func (cfg *frozenConfig) MarshalIndent(v interface{}, prefix, indent string) ([]
|
|||||||
}
|
}
|
||||||
newCfg := cfg.configBeforeFrozen
|
newCfg := cfg.configBeforeFrozen
|
||||||
newCfg.IndentionStep = len(indent)
|
newCfg.IndentionStep = len(indent)
|
||||||
return newCfg.frozeWithCacheReuse().Marshal(v)
|
return newCfg.frozeWithCacheReuse(cfg.extraExtensions).Marshal(v)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (cfg *frozenConfig) UnmarshalFromString(str string, v interface{}) error {
|
func (cfg *frozenConfig) UnmarshalFromString(str string, v interface{}) error {
|
||||||
|
13
vendor/github.com/json-iterator/go/iter_object.go
generated
vendored
13
vendor/github.com/json-iterator/go/iter_object.go
generated
vendored
@ -2,7 +2,7 @@ package jsoniter
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"unicode"
|
"strings"
|
||||||
)
|
)
|
||||||
|
|
||||||
// ReadObject read one field from object.
|
// ReadObject read one field from object.
|
||||||
@ -96,13 +96,12 @@ func (iter *Iterator) readFieldHash() int64 {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func calcHash(str string, caseSensitive bool) int64 {
|
func calcHash(str string, caseSensitive bool) int64 {
|
||||||
|
if !caseSensitive {
|
||||||
|
str = strings.ToLower(str)
|
||||||
|
}
|
||||||
hash := int64(0x811c9dc5)
|
hash := int64(0x811c9dc5)
|
||||||
for _, b := range str {
|
for _, b := range []byte(str) {
|
||||||
if caseSensitive {
|
hash ^= int64(b)
|
||||||
hash ^= int64(b)
|
|
||||||
} else {
|
|
||||||
hash ^= int64(unicode.ToLower(b))
|
|
||||||
}
|
|
||||||
hash *= 0x1000193
|
hash *= 0x1000193
|
||||||
}
|
}
|
||||||
return int64(hash)
|
return int64(hash)
|
||||||
|
6
vendor/github.com/json-iterator/go/reflect.go
generated
vendored
6
vendor/github.com/json-iterator/go/reflect.go
generated
vendored
@ -120,7 +120,8 @@ func decoderOfType(ctx *ctx, typ reflect2.Type) ValDecoder {
|
|||||||
for _, extension := range extensions {
|
for _, extension := range extensions {
|
||||||
decoder = extension.DecorateDecoder(typ, decoder)
|
decoder = extension.DecorateDecoder(typ, decoder)
|
||||||
}
|
}
|
||||||
for _, extension := range ctx.extensions {
|
decoder = ctx.decoderExtension.DecorateDecoder(typ, decoder)
|
||||||
|
for _, extension := range ctx.extraExtensions {
|
||||||
decoder = extension.DecorateDecoder(typ, decoder)
|
decoder = extension.DecorateDecoder(typ, decoder)
|
||||||
}
|
}
|
||||||
return decoder
|
return decoder
|
||||||
@ -222,7 +223,8 @@ func encoderOfType(ctx *ctx, typ reflect2.Type) ValEncoder {
|
|||||||
for _, extension := range extensions {
|
for _, extension := range extensions {
|
||||||
encoder = extension.DecorateEncoder(typ, encoder)
|
encoder = extension.DecorateEncoder(typ, encoder)
|
||||||
}
|
}
|
||||||
for _, extension := range ctx.extensions {
|
encoder = ctx.encoderExtension.DecorateEncoder(typ, encoder)
|
||||||
|
for _, extension := range ctx.extraExtensions {
|
||||||
encoder = extension.DecorateEncoder(typ, encoder)
|
encoder = extension.DecorateEncoder(typ, encoder)
|
||||||
}
|
}
|
||||||
return encoder
|
return encoder
|
||||||
|
26
vendor/github.com/json-iterator/go/reflect_extension.go
generated
vendored
26
vendor/github.com/json-iterator/go/reflect_extension.go
generated
vendored
@ -246,7 +246,8 @@ func getTypeDecoderFromExtension(ctx *ctx, typ reflect2.Type) ValDecoder {
|
|||||||
for _, extension := range extensions {
|
for _, extension := range extensions {
|
||||||
decoder = extension.DecorateDecoder(typ, decoder)
|
decoder = extension.DecorateDecoder(typ, decoder)
|
||||||
}
|
}
|
||||||
for _, extension := range ctx.extensions {
|
decoder = ctx.decoderExtension.DecorateDecoder(typ, decoder)
|
||||||
|
for _, extension := range ctx.extraExtensions {
|
||||||
decoder = extension.DecorateDecoder(typ, decoder)
|
decoder = extension.DecorateDecoder(typ, decoder)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -259,14 +260,18 @@ func _getTypeDecoderFromExtension(ctx *ctx, typ reflect2.Type) ValDecoder {
|
|||||||
return decoder
|
return decoder
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
for _, extension := range ctx.extensions {
|
decoder := ctx.decoderExtension.CreateDecoder(typ)
|
||||||
|
if decoder != nil {
|
||||||
|
return decoder
|
||||||
|
}
|
||||||
|
for _, extension := range ctx.extraExtensions {
|
||||||
decoder := extension.CreateDecoder(typ)
|
decoder := extension.CreateDecoder(typ)
|
||||||
if decoder != nil {
|
if decoder != nil {
|
||||||
return decoder
|
return decoder
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
typeName := typ.String()
|
typeName := typ.String()
|
||||||
decoder := typeDecoders[typeName]
|
decoder = typeDecoders[typeName]
|
||||||
if decoder != nil {
|
if decoder != nil {
|
||||||
return decoder
|
return decoder
|
||||||
}
|
}
|
||||||
@ -286,7 +291,8 @@ func getTypeEncoderFromExtension(ctx *ctx, typ reflect2.Type) ValEncoder {
|
|||||||
for _, extension := range extensions {
|
for _, extension := range extensions {
|
||||||
encoder = extension.DecorateEncoder(typ, encoder)
|
encoder = extension.DecorateEncoder(typ, encoder)
|
||||||
}
|
}
|
||||||
for _, extension := range ctx.extensions {
|
encoder = ctx.encoderExtension.DecorateEncoder(typ, encoder)
|
||||||
|
for _, extension := range ctx.extraExtensions {
|
||||||
encoder = extension.DecorateEncoder(typ, encoder)
|
encoder = extension.DecorateEncoder(typ, encoder)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -300,14 +306,18 @@ func _getTypeEncoderFromExtension(ctx *ctx, typ reflect2.Type) ValEncoder {
|
|||||||
return encoder
|
return encoder
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
for _, extension := range ctx.extensions {
|
encoder := ctx.encoderExtension.CreateEncoder(typ)
|
||||||
|
if encoder != nil {
|
||||||
|
return encoder
|
||||||
|
}
|
||||||
|
for _, extension := range ctx.extraExtensions {
|
||||||
encoder := extension.CreateEncoder(typ)
|
encoder := extension.CreateEncoder(typ)
|
||||||
if encoder != nil {
|
if encoder != nil {
|
||||||
return encoder
|
return encoder
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
typeName := typ.String()
|
typeName := typ.String()
|
||||||
encoder := typeEncoders[typeName]
|
encoder = typeEncoders[typeName]
|
||||||
if encoder != nil {
|
if encoder != nil {
|
||||||
return encoder
|
return encoder
|
||||||
}
|
}
|
||||||
@ -393,7 +403,9 @@ func createStructDescriptor(ctx *ctx, typ reflect2.Type, bindings []*Binding, em
|
|||||||
for _, extension := range extensions {
|
for _, extension := range extensions {
|
||||||
extension.UpdateStructDescriptor(structDescriptor)
|
extension.UpdateStructDescriptor(structDescriptor)
|
||||||
}
|
}
|
||||||
for _, extension := range ctx.extensions {
|
ctx.encoderExtension.UpdateStructDescriptor(structDescriptor)
|
||||||
|
ctx.decoderExtension.UpdateStructDescriptor(structDescriptor)
|
||||||
|
for _, extension := range ctx.extraExtensions {
|
||||||
extension.UpdateStructDescriptor(structDescriptor)
|
extension.UpdateStructDescriptor(structDescriptor)
|
||||||
}
|
}
|
||||||
processTags(structDescriptor, ctx.frozenConfig)
|
processTags(structDescriptor, ctx.frozenConfig)
|
||||||
|
12
vendor/github.com/json-iterator/go/reflect_map.go
generated
vendored
12
vendor/github.com/json-iterator/go/reflect_map.go
generated
vendored
@ -39,7 +39,11 @@ func encoderOfMap(ctx *ctx, typ reflect2.Type) ValEncoder {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func decoderOfMapKey(ctx *ctx, typ reflect2.Type) ValDecoder {
|
func decoderOfMapKey(ctx *ctx, typ reflect2.Type) ValDecoder {
|
||||||
for _, extension := range ctx.extensions {
|
decoder := ctx.decoderExtension.CreateMapKeyDecoder(typ)
|
||||||
|
if decoder != nil {
|
||||||
|
return decoder
|
||||||
|
}
|
||||||
|
for _, extension := range ctx.extraExtensions {
|
||||||
decoder := extension.CreateMapKeyDecoder(typ)
|
decoder := extension.CreateMapKeyDecoder(typ)
|
||||||
if decoder != nil {
|
if decoder != nil {
|
||||||
return decoder
|
return decoder
|
||||||
@ -77,7 +81,11 @@ func decoderOfMapKey(ctx *ctx, typ reflect2.Type) ValDecoder {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func encoderOfMapKey(ctx *ctx, typ reflect2.Type) ValEncoder {
|
func encoderOfMapKey(ctx *ctx, typ reflect2.Type) ValEncoder {
|
||||||
for _, extension := range ctx.extensions {
|
encoder := ctx.encoderExtension.CreateMapKeyEncoder(typ)
|
||||||
|
if encoder != nil {
|
||||||
|
return encoder
|
||||||
|
}
|
||||||
|
for _, extension := range ctx.extraExtensions {
|
||||||
encoder := extension.CreateMapKeyEncoder(typ)
|
encoder := extension.CreateMapKeyEncoder(typ)
|
||||||
if encoder != nil {
|
if encoder != nil {
|
||||||
return encoder
|
return encoder
|
||||||
|
3
vendor/github.com/modern-go/reflect2/reflect2.go
generated
vendored
3
vendor/github.com/modern-go/reflect2/reflect2.go
generated
vendored
@ -150,6 +150,9 @@ func (cfg *frozenConfig) TypeOf(obj interface{}) Type {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (cfg *frozenConfig) Type2(type1 reflect.Type) Type {
|
func (cfg *frozenConfig) Type2(type1 reflect.Type) Type {
|
||||||
|
if type1 == nil {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
cacheKey := uintptr(unpackEFace(type1).data)
|
cacheKey := uintptr(unpackEFace(type1).data)
|
||||||
typeObj, found := cfg.cache.Load(cacheKey)
|
typeObj, found := cfg.cache.Load(cacheKey)
|
||||||
if found {
|
if found {
|
||||||
|
6
vendor/github.com/tchap/go-patricia/README.md
generated
vendored
6
vendor/github.com/tchap/go-patricia/README.md
generated
vendored
@ -1,6 +1,8 @@
|
|||||||
# go-patricia #
|
# go-patricia #
|
||||||
|
|
||||||
**Documentation**: [GoDoc](http://godoc.org/github.com/tchap/go-patricia/patricia)<br />
|
**Documentation**: [GoDoc](http://godoc.org/github.com/tchap/go-patricia/patricia)<br />
|
||||||
|
**Build Status**: [](https://drone.io/github.com/tchap/go-patricia/latest)<br />
|
||||||
**Test Coverage**: [](https://coveralls.io/r/tchap/go-patricia)
|
Status](https://coveralls.io/repos/tchap/go-patricia/badge.png)](https://coveralls.io/r/tchap/go-patricia)
|
||||||
|
|
||||||
@ -115,3 +117,7 @@ MIT, check the `LICENSE` file.
|
|||||||
[](https://www.gittip.com/tchap/
|
Badge](http://img.shields.io/gittip/alanhamlett.png)](https://www.gittip.com/tchap/
|
||||||
"Gittip Badge")
|
"Gittip Badge")
|
||||||
|
|
||||||
|
[](https://bitdeli.com/free
|
||||||
|
"Bitdeli Badge")
|
||||||
|
Loading…
Reference in New Issue
Block a user