aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/gopkg.in/yaml.v3/encode.go
diff options
context:
space:
mode:
authortechknowlogick <techknowlogick@gitea.io>2021-02-28 18:08:33 -0500
committerGitHub <noreply@github.com>2021-02-28 18:08:33 -0500
commit47f6a4ec3f058f69b65fb6501d6ac98994b8f8da (patch)
tree4d1421a4c836de9de4014117419c151035c17eec /vendor/gopkg.in/yaml.v3/encode.go
parent030646eea41e17e58e11e73b19339630b6d6148e (diff)
downloadgitea-47f6a4ec3f058f69b65fb6501d6ac98994b8f8da.tar.gz
gitea-47f6a4ec3f058f69b65fb6501d6ac98994b8f8da.zip
go1.16 (#14783)
Diffstat (limited to 'vendor/gopkg.in/yaml.v3/encode.go')
-rw-r--r--vendor/gopkg.in/yaml.v3/encode.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/vendor/gopkg.in/yaml.v3/encode.go b/vendor/gopkg.in/yaml.v3/encode.go
index 45e8d1e1b9..de9e72a3e6 100644
--- a/vendor/gopkg.in/yaml.v3/encode.go
+++ b/vendor/gopkg.in/yaml.v3/encode.go
@@ -120,6 +120,11 @@ func (e *encoder) marshal(tag string, in reflect.Value) {
e.nodev(in)
return
case Node:
+ if !in.CanAddr() {
+ var n = reflect.New(in.Type()).Elem()
+ n.Set(in)
+ in = n
+ }
e.nodev(in.Addr())
return
case time.Time: