diff options
author | Jaewoong Jung <jungjw@google.com> | 2019-06-22 11:19:34 -0700 |
---|---|---|
committer | Rashed Abdel-Tawab <rashed@linux.com> | 2019-09-24 13:19:56 -0700 |
commit | 88eba119b051453dac79b01d9a790b6d661dd943 (patch) | |
tree | 47b7b6188ad7e8ce2804f624ef576466b1d4df2b | |
parent | d297a0797d1c0955ceb923ca38ce0dfb13236337 (diff) | |
download | android_build_blueprint-lineage-17.0.tar.gz android_build_blueprint-lineage-17.0.tar.bz2 android_build_blueprint-lineage-17.0.zip |
Make off-the-shelf order funcs public.lineage-17.0
These are useful outside the package too when calling
proptools.ExtendMatchingProperties.
Change-Id: I054eb105e0dd5287aff99b8be137a8b09d52492d
-rw-r--r-- | proptools/extend.go | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/proptools/extend.go b/proptools/extend.go index 1f323cf..f588ab2 100644 --- a/proptools/extend.go +++ b/proptools/extend.go @@ -34,7 +34,7 @@ import ( // embedded structs, pointers to structs, and interfaces containing // pointers to structs. Appending the zero value of a property will always be a no-op. func AppendProperties(dst interface{}, src interface{}, filter ExtendPropertyFilterFunc) error { - return extendProperties(dst, src, filter, orderAppend) + return extendProperties(dst, src, filter, OrderAppend) } // PrependProperties prepends the values of properties in the property struct src to the property @@ -52,7 +52,7 @@ func AppendProperties(dst interface{}, src interface{}, filter ExtendPropertyFil // embedded structs, pointers to structs, and interfaces containing // pointers to structs. Prepending the zero value of a property will always be a no-op. func PrependProperties(dst interface{}, src interface{}, filter ExtendPropertyFilterFunc) error { - return extendProperties(dst, src, filter, orderPrepend) + return extendProperties(dst, src, filter, OrderPrepend) } // AppendMatchingProperties appends the values of properties in the property struct src to the @@ -73,7 +73,7 @@ func PrependProperties(dst interface{}, src interface{}, filter ExtendPropertyFi // pointers to structs. Appending the zero value of a property will always be a no-op. func AppendMatchingProperties(dst []interface{}, src interface{}, filter ExtendPropertyFilterFunc) error { - return extendMatchingProperties(dst, src, filter, orderAppend) + return extendMatchingProperties(dst, src, filter, OrderAppend) } // PrependMatchingProperties prepends the values of properties in the property struct src to the @@ -94,7 +94,7 @@ func AppendMatchingProperties(dst []interface{}, src interface{}, // pointers to structs. Prepending the zero value of a property will always be a no-op. func PrependMatchingProperties(dst []interface{}, src interface{}, filter ExtendPropertyFilterFunc) error { - return extendMatchingProperties(dst, src, filter, orderPrepend) + return extendMatchingProperties(dst, src, filter, OrderPrepend) } // ExtendProperties appends or prepends the values of properties in the property struct src to the @@ -160,13 +160,13 @@ type ExtendPropertyOrderFunc func(property string, dstField, srcField reflect.StructField, dstValue, srcValue interface{}) (Order, error) -func orderAppend(property string, +func OrderAppend(property string, dstField, srcField reflect.StructField, dstValue, srcValue interface{}) (Order, error) { return Append, nil } -func orderPrepend(property string, +func OrderPrepend(property string, dstField, srcField reflect.StructField, dstValue, srcValue interface{}) (Order, error) { return Prepend, nil |