summaryrefslogtreecommitdiff
path: root/api/api.go
diff options
context:
space:
mode:
author Zi Wang <mrziwang@google.com> 2023-03-15 16:38:54 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2023-03-15 16:38:54 +0000
commit3cd394fa7d74fd1af4efd876d9608a5df6e5cd20 (patch)
tree4d98f90d06195884337eb9945646439c0d765c63 /api/api.go
parentbeefb571f6b15da61cbc2faadc6365cd84653ff9 (diff)
parent11adb1d3ad0fca6b221a0392cb10faddd27794c3 (diff)
Merge "Remove unnecessary slice in combined_apis bp2build converter"
Diffstat (limited to 'api/api.go')
-rw-r--r--api/api.go4
1 files changed, 1 insertions, 3 deletions
diff --git a/api/api.go b/api/api.go
index 25d97282035e..9876abb8ce36 100644
--- a/api/api.go
+++ b/api/api.go
@@ -418,7 +418,6 @@ type bazelCombinedApisAttributes struct {
// combined_apis bp2build converter
func (a *CombinedApis) ConvertWithBp2build(ctx android.TopDownMutatorContext) {
basePrefix := "non-updatable"
- scopeNames := []string{"public", "system", "module-lib", "system-server"}
scopeToSuffix := map[string]string{
"public": "-current.txt",
"system": "-system-current.txt",
@@ -426,8 +425,7 @@ func (a *CombinedApis) ConvertWithBp2build(ctx android.TopDownMutatorContext) {
"system-server": "-system-server-current.txt",
}
- for _, scopeName := range scopeNames{
- suffix := scopeToSuffix[scopeName]
+ for scopeName, suffix := range scopeToSuffix{
name := a.Name() + suffix
var scope bazel.StringAttribute