Merge changes from topics "remove_api_files", "remove_naming_convention" into main am: 534e2e504d
am: 426d016353
am: 1eaf6404ab
am: 3f2880d220
am: 6c54015e4a
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2758365 Change-Id: I5b63aad96dad5f7a2927babd7238f7ffded8b1c5 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -286,6 +286,17 @@ func (scopes apiScopes) Strings(accessor func(*apiScope) string) []string {
|
||||
return list
|
||||
}
|
||||
|
||||
// Method that maps the apiScopes properties to the index of each apiScopes elements.
|
||||
// apiScopes property to be used as the key can be specified with the input accessor.
|
||||
// Only a string property of apiScope can be used as the key of the map.
|
||||
func (scopes apiScopes) MapToIndex(accessor func(*apiScope) string) map[string]int {
|
||||
ret := make(map[string]int)
|
||||
for i, scope := range scopes {
|
||||
ret[accessor(scope)] = i
|
||||
}
|
||||
return ret
|
||||
}
|
||||
|
||||
var (
|
||||
scopeByName = make(map[string]*apiScope)
|
||||
allScopeNames []string
|
||||
|
Reference in New Issue
Block a user