Ver Fonte

Update feature_adapter.go

yellow chicks há 8 anos atrás
pai
commit
67be6df2b1
1 ficheiros alterados com 1 adições e 2 exclusões
  1. 1 2
      feature_adapter.go

+ 1 - 2
feature_adapter.go

@@ -17,8 +17,7 @@ func Unmarshal(data []byte, v interface{}) error {
 	typ := reflect.TypeOf(v)
 	if typ.Kind() != reflect.Ptr {
 		// return non-pointer error
-		err = errors.New("the second param must be ptr type")
-		return
+		return errors.New("the second param must be ptr type")
 	}
 	iter.ReadVal(v)
 	if iter.head == iter.tail {