aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/github.com/golang/protobuf/proto/pointer_reflect.go
diff options
context:
space:
mode:
authorCherrg <michael@gnehr.de>2019-07-06 17:16:43 +0200
committerzeripath <art27@cantab.net>2019-07-06 16:16:43 +0100
commit86750325c76ec18c253fabd4aeed72caca0ee946 (patch)
tree96fcbcf078e9170c627f723ef6967c29b28f4b8d /vendor/github.com/golang/protobuf/proto/pointer_reflect.go
parent49ee9d27718c31d5ab4fe9543fefc90cd40d4405 (diff)
downloadgitea-86750325c76ec18c253fabd4aeed72caca0ee946.tar.gz
gitea-86750325c76ec18c253fabd4aeed72caca0ee946.zip
workaround broken drone build (#7362)
* workaround broken swagger only master brach is not working, latest release seems to work Signed-off-by: Michael Gnehr <michael@gnehr.de> * make vendor Signed-off-by: Michael Gnehr <michael@gnehr.de> * Don't export GO111MODULE * set go-swagger to fixed release version mentioned here: https://github.com/go-gitea/gitea/pull/7362#discussion_r300831537 Signed-off-by: Michael Gnehr <michael@gnehr.de>
Diffstat (limited to 'vendor/github.com/golang/protobuf/proto/pointer_reflect.go')
-rw-r--r--vendor/github.com/golang/protobuf/proto/pointer_reflect.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/vendor/github.com/golang/protobuf/proto/pointer_reflect.go b/vendor/github.com/golang/protobuf/proto/pointer_reflect.go
index b6cad90834..94fa9194a8 100644
--- a/vendor/github.com/golang/protobuf/proto/pointer_reflect.go
+++ b/vendor/github.com/golang/protobuf/proto/pointer_reflect.go
@@ -79,10 +79,13 @@ func toPointer(i *Message) pointer {
// toAddrPointer converts an interface to a pointer that points to
// the interface data.
-func toAddrPointer(i *interface{}, isptr bool) pointer {
+func toAddrPointer(i *interface{}, isptr, deref bool) pointer {
v := reflect.ValueOf(*i)
u := reflect.New(v.Type())
u.Elem().Set(v)
+ if deref {
+ u = u.Elem()
+ }
return pointer{v: u}
}