diff --git a/decode.go b/decode.go index 0173b698..fd92c3de 100644 --- a/decode.go +++ b/decode.go @@ -575,7 +575,7 @@ func (d *decoder) scalar(n *Node, out reflect.Value) bool { if err != nil { failf("!!binary value contains invalid base64 data") } - resolved = string(data) + resolved = data } } if resolved == nil { diff --git a/decode_test.go b/decode_test.go index 0364b0bb..d45b0968 100644 --- a/decode_test.go +++ b/decode_test.go @@ -26,7 +26,7 @@ import ( "time" . "gopkg.in/check.v1" - "gopkg.in/yaml.v3" + "github.com/setrofim/yaml" ) var unmarshalIntTest = 123 @@ -633,13 +633,13 @@ var unmarshalTests = []struct { // Binary data. { "a: !!binary gIGC\n", - map[string]string{"a": "\x80\x81\x82"}, + map[string][]byte{"a": []byte{0x80, 0x81, 0x82}}, }, { "a: !!binary |\n " + strings.Repeat("kJCQ", 17) + "kJ\n CQ\n", - map[string]string{"a": strings.Repeat("\x90", 54)}, + map[string][]byte{"a": bytes.Repeat([]byte{0x90}, 54)}, }, { "a: !!binary |\n " + strings.Repeat("A", 70) + "\n ==\n", - map[string]string{"a": strings.Repeat("\x00", 52)}, + map[string][]byte{"a": bytes.Repeat([]byte{0x00}, 52)}, }, // Issue #39. diff --git a/encode_test.go b/encode_test.go index 4a8bf2e2..f795dad9 100644 --- a/encode_test.go +++ b/encode_test.go @@ -27,7 +27,7 @@ import ( "os" . "gopkg.in/check.v1" - "gopkg.in/yaml.v3" + "github.com/setrofim/yaml" ) var marshalIntTest = 123 diff --git a/example_embedded_test.go b/example_embedded_test.go index 9d17398a..f18ee3a3 100644 --- a/example_embedded_test.go +++ b/example_embedded_test.go @@ -19,7 +19,7 @@ import ( "fmt" "log" - "gopkg.in/yaml.v3" + "github.com/setrofim/yaml" ) // An example showing how to unmarshal embedded diff --git a/go.mod b/go.mod index f407ea32..705d2d1e 100644 --- a/go.mod +++ b/go.mod @@ -1,5 +1,5 @@ -module "gopkg.in/yaml.v3" +module github.com/setrofim/yaml require ( - "gopkg.in/check.v1" v0.0.0-20161208181325-20d25e280405 + gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 ) diff --git a/limit_test.go b/limit_test.go index 07a3cbd4..53c1a3b1 100644 --- a/limit_test.go +++ b/limit_test.go @@ -5,7 +5,7 @@ import ( "testing" . "gopkg.in/check.v1" - "gopkg.in/yaml.v3" + "github.com/setrofim/yaml" ) var limitTests = []struct { diff --git a/node_test.go b/node_test.go index b7d0c9a3..1ec928c0 100644 --- a/node_test.go +++ b/node_test.go @@ -21,7 +21,7 @@ import ( "os" . "gopkg.in/check.v1" - "gopkg.in/yaml.v3" + "github.com/setrofim/yaml" "io" "strings" ) @@ -2689,15 +2689,7 @@ var setStringTests = []struct { Tag: "!!str", Style: yaml.LiteralStyle, }, - }, { - "\x80\x81\x82", - "!!binary gIGC\n", - yaml.Node{ - Kind: yaml.ScalarNode, - Value: "gIGC", - Tag: "!!binary", - }, - }, + }, } func (s *S) TestSetString(c *C) {