vendor update

This commit is contained in:
Abhishek
2017-03-24 00:31:39 +05:30
parent 55ad1d9b1f
commit d212758856
67 changed files with 1198 additions and 2348 deletions
+5 -2
View File
@@ -431,7 +431,7 @@ func strctVal(s interface{}) reflect.Value {
v := reflect.ValueOf(s)
// if pointer get the underlying element≤
if v.Kind() == reflect.Ptr {
for v.Kind() == reflect.Ptr {
v = v.Elem()
}
@@ -558,7 +558,10 @@ func (s *Struct) nested(val reflect.Value) interface{} {
// TODO(arslan): should this be optional?
// do not iterate of non struct types, just pass the value. Ie: []int,
// []string, co... We only iterate further if it's a struct.
if val.Type().Elem().Kind() != reflect.Struct {
// i.e []foo or []*foo
if val.Type().Elem().Kind() != reflect.Struct &&
!(val.Type().Elem().Kind() == reflect.Ptr &&
val.Type().Elem().Elem().Kind() == reflect.Struct) {
finalVal = val.Interface()
break
}