summaryrefslogtreecommitdiffstats
path: root/vendor/gopkg.in/yaml.v2/example_embedded_test.go
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/yaml.v2/example_embedded_test.go
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/yaml.v2/example_embedded_test.go')
-rw-r--r--vendor/gopkg.in/yaml.v2/example_embedded_test.go18
1 files changed, 9 insertions, 9 deletions
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
}