Revert^2 "refactor of api_levels map for soong injection"

a865f4e905

Change-Id: Ifea020ac83725df7131773ca587c56931f5cdf03
This commit is contained in:
Alix Espino
2023-02-24 14:46:43 +00:00
committed by Gerrit Code Review
parent a865f4e905
commit 4fd7e74140
3 changed files with 42 additions and 54 deletions

View File

@@ -17,6 +17,7 @@ package starlark_fmt
import (
"fmt"
"sort"
"strconv"
"strings"
)
@@ -84,6 +85,16 @@ func PrintBoolDict(dict map[string]bool, indentLevel int) string {
return PrintDict(formattedValueDict, indentLevel)
}
// PrintStringIntDict returns a Starlark-compatible string formatted as dictionary with
// string keys and int values.
func PrintStringIntDict(dict map[string]int, indentLevel int) string {
valDict := make(map[string]string, len(dict))
for k, v := range dict {
valDict[k] = strconv.Itoa(v)
}
return PrintDict(valDict, indentLevel)
}
// PrintDict returns a starlark-compatible string containing a dictionary with string keys and
// values printed with no additional formatting.
func PrintDict(dict map[string]string, indentLevel int) string {