summaryrefslogtreecommitdiffstats
path: root/vendor/gopkg.in
diff options
context:
space:
mode:
authorHarrison Healey <harrisonmhealey@gmail.com>2018-01-16 12:03:31 -0500
committerGitHub <noreply@github.com>2018-01-16 12:03:31 -0500
commit2fa7c464f019f67c5c0494aaf5ac0f5ecc1ee7a7 (patch)
treee08ff912e1924c06939f314168c3362d6f1ec0de /vendor/gopkg.in
parentf5c8a71698d0a7a16c68be220e49fe64bfee7f5c (diff)
downloadchat-2fa7c464f019f67c5c0494aaf5ac0f5ecc1ee7a7.tar.gz
chat-2fa7c464f019f67c5c0494aaf5ac0f5ecc1ee7a7.tar.bz2
chat-2fa7c464f019f67c5c0494aaf5ac0f5ecc1ee7a7.zip
Updated dependencies and added avct/uasurfer (#8089)
* Updated dependencies and added avct/uasurfer * Added uasurfer to NOTICE.txt
Diffstat (limited to 'vendor/gopkg.in')
-rw-r--r--vendor/gopkg.in/yaml.v2/README.md2
-rw-r--r--vendor/gopkg.in/yaml.v2/decode.go4
-rw-r--r--vendor/gopkg.in/yaml.v2/decode_test.go17
-rw-r--r--vendor/gopkg.in/yaml.v2/emitterc.go6
-rw-r--r--vendor/gopkg.in/yaml.v2/example_embedded_test.go18
-rw-r--r--vendor/gopkg.in/yaml.v2/yaml.go2
6 files changed, 33 insertions, 16 deletions
diff --git a/vendor/gopkg.in/yaml.v2/README.md b/vendor/gopkg.in/yaml.v2/README.md
index 7a512d67c..2ed3314c7 100644
--- a/vendor/gopkg.in/yaml.v2/README.md
+++ b/vendor/gopkg.in/yaml.v2/README.md
@@ -67,6 +67,8 @@ b:
d: [3, 4]
`
+// Note: struct fields must be public in order for unmarshal to
+// correctly populate the data.
type T struct {
A string
B struct {
diff --git a/vendor/gopkg.in/yaml.v2/decode.go b/vendor/gopkg.in/yaml.v2/decode.go
index db1f5f206..e85eb2e3f 100644
--- a/vendor/gopkg.in/yaml.v2/decode.go
+++ b/vendor/gopkg.in/yaml.v2/decode.go
@@ -251,7 +251,7 @@ func (d *decoder) callUnmarshaler(n *node, u Unmarshaler) (good bool) {
//
// If n holds a null value, prepare returns before doing anything.
func (d *decoder) prepare(n *node, out reflect.Value) (newout reflect.Value, unmarshaled, good bool) {
- if n.tag == yaml_NULL_TAG || n.kind == scalarNode && n.tag == "" && (n.value == "null" || n.value == "" && n.implicit) {
+ if n.tag == yaml_NULL_TAG || n.kind == scalarNode && n.tag == "" && (n.value == "null" || n.value == "~" || n.value == "" && n.implicit) {
return out, false, false
}
again := true
@@ -641,7 +641,7 @@ func (d *decoder) mappingStruct(n *node, out reflect.Value) (good bool) {
d.unmarshal(n.children[i+1], value)
inlineMap.SetMapIndex(name, value)
} else if d.strict {
- d.terrors = append(d.terrors, fmt.Sprintf("line %d: field %s not found in struct %s", n.line+1, name.String(), out.Type()))
+ d.terrors = append(d.terrors, fmt.Sprintf("line %d: field %s not found in struct %s", ni.line+1, name.String(), out.Type()))
}
}
return true
diff --git a/vendor/gopkg.in/yaml.v2/decode_test.go b/vendor/gopkg.in/yaml.v2/decode_test.go
index 713b1ee9c..e5366c261 100644
--- a/vendor/gopkg.in/yaml.v2/decode_test.go
+++ b/vendor/gopkg.in/yaml.v2/decode_test.go
@@ -440,12 +440,27 @@ var unmarshalTests = []struct {
map[string]*string{"foo": new(string)},
}, {
"foo: null",
+ map[string]*string{"foo": nil},
+ }, {
+ "foo: null",
map[string]string{"foo": ""},
}, {
"foo: null",
map[string]interface{}{"foo": nil},
},
+ // Support for ~
+ {
+ "foo: ~",
+ map[string]*string{"foo": nil},
+ }, {
+ "foo: ~",
+ map[string]string{"foo": ""},
+ }, {
+ "foo: ~",
+ map[string]interface{}{"foo": nil},
+ },
+
// Ignored field
{
"a: 1\nb: 2\n",
@@ -984,7 +999,7 @@ func (s *S) TestUnmarshalStrict(c *C) {
err = yaml.Unmarshal([]byte("a: 1\nb: 2\nc: 3"), &v)
c.Check(err, IsNil)
err = yaml.UnmarshalStrict([]byte("a: 1\nb: 2\nc: 3"), &v)
- c.Check(err, ErrorMatches, "yaml: unmarshal errors:\n line 1: field c not found in struct struct { A int; B int }")
+ c.Check(err, ErrorMatches, "yaml: unmarshal errors:\n line 3: field c not found in struct struct { A int; B int }")
}
//var data []byte
diff --git a/vendor/gopkg.in/yaml.v2/emitterc.go b/vendor/gopkg.in/yaml.v2/emitterc.go
index 41de8b856..dcaf502f0 100644
--- a/vendor/gopkg.in/yaml.v2/emitterc.go
+++ b/vendor/gopkg.in/yaml.v2/emitterc.go
@@ -995,9 +995,9 @@ func yaml_emitter_analyze_scalar(emitter *yaml_emitter_t, value []byte) bool {
space_break = false
preceded_by_whitespace = false
- followed_by_whitespace = false
- previous_space = false
- previous_break = false
+ followed_by_whitespace = false
+ previous_space = false
+ previous_break = false
)
emitter.scalar_data.value = value
diff --git a/vendor/gopkg.in/yaml.v2/example_embedded_test.go b/vendor/gopkg.in/yaml.v2/example_embedded_test.go
index c8b241d54..171c0931a 100644
--- a/vendor/gopkg.in/yaml.v2/example_embedded_test.go
+++ b/vendor/gopkg.in/yaml.v2/example_embedded_test.go
@@ -4,7 +4,7 @@ import (
"fmt"
"log"
- "gopkg.in/yaml.v2"
+ "gopkg.in/yaml.v2"
)
// An example showing how to unmarshal embedded
@@ -17,8 +17,8 @@ type StructA struct {
type StructB struct {
// Embedded structs are not treated as embedded in YAML by default. To do that,
// add the ",inline" annotation below
- StructA `yaml:",inline"`
- B string `yaml:"b"`
+ StructA `yaml:",inline"`
+ B string `yaml:"b"`
}
var data = `
@@ -31,11 +31,11 @@ func ExampleUnmarshal_embedded() {
err := yaml.Unmarshal([]byte(data), &b)
if err != nil {
- log.Fatal("cannot unmarshal data: %v", err)
+ log.Fatalf("cannot unmarshal data: %v", err)
}
- fmt.Println(b.A)
- fmt.Println(b.B)
- // Output:
- // a string from struct A
- // a string from struct B
+ fmt.Println(b.A)
+ fmt.Println(b.B)
+ // Output:
+ // a string from struct A
+ // a string from struct B
}
diff --git a/vendor/gopkg.in/yaml.v2/yaml.go b/vendor/gopkg.in/yaml.v2/yaml.go
index bf18884e0..5e3c2daee 100644
--- a/vendor/gopkg.in/yaml.v2/yaml.go
+++ b/vendor/gopkg.in/yaml.v2/yaml.go
@@ -140,7 +140,7 @@ func unmarshal(in []byte, out interface{}, strict bool) (err error) {
// For example:
//
// type T struct {
-// F int "a,omitempty"
+// F int `yaml:"a,omitempty"`
// B int
// }
// yaml.Marshal(&T{B: 2}) // Returns "b: 2\n"