aboutsummaryrefslogtreecommitdiffstats
path: root/android/util.go
diff options
context:
space:
mode:
Diffstat (limited to 'android/util.go')
-rw-r--r--android/util.go9
1 files changed, 9 insertions, 0 deletions
diff --git a/android/util.go b/android/util.go
index 8cee256c..80c7870a 100644
--- a/android/util.go
+++ b/android/util.go
@@ -68,6 +68,15 @@ func inList(s string, list []string) bool {
return indexList(s, list) != -1
}
+func prefixInList(s string, list []string) bool {
+ for _, prefix := range list {
+ if strings.HasPrefix(s, prefix) {
+ return true
+ }
+ }
+ return false
+}
+
// checkCalledFromInit panics if a Go package's init function is not on the
// call stack.
func checkCalledFromInit() {