summaryrefslogtreecommitdiff
path: root/api/api.go
diff options
context:
space:
mode:
author Zi Wang <mrziwang@google.com> 2023-03-08 10:56:33 -0800
committer Zi Wang <mrziwang@google.com> 2023-03-08 10:58:24 -0800
commit11adb1d3ad0fca6b221a0392cb10faddd27794c3 (patch)
tree15c6559ef97df98a68958dd496467dc966549647 /api/api.go
parent73de090fa5dc7aaeacae3b1e436f862a9e80f7dc (diff)
Remove unnecessary slice in combined_apis bp2build converter
Test: m and api_test Change-Id: Id36892325ffd35004c4b88b69d52f9e1c6afe759
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