Reimplement DepSet as a wrapper around a generic implementation
Implement depSet as a generic depsets implementation using reflection,
and then make DepSet a type-safe wrapper around it. This will allow
additional wrappers for depsets that work with other types. All of
this can be replaced with generics once Go supports them.
Test: depset_test.go
Change-Id: Id9df17bcc76f6c1545e7eb498f298066cf8a7679
diff --git a/android/util_test.go b/android/util_test.go
index 25b52ca..fa26c77 100644
--- a/android/util_test.go
+++ b/android/util_test.go
@@ -593,6 +593,10 @@
name: "map",
f: firstUniqueStringsMap,
},
+ {
+ name: "optimal",
+ f: FirstUniqueStrings,
+ },
}
const maxSize = 1024
uniqueStrings := make([]string, maxSize)