Replace SortedStringKeys with SortedKeys
Now that we have generics. Bug: 193460475 Test: presubmits Change-Id: I1594fd8feb505175d5c09c03ef397e5ffd5b09cb
This commit is contained in:
@@ -301,23 +301,6 @@ func (defs *Bp2BuildSoongConfigDefinitions) AddVars(mtDef SoongConfigDefinition)
|
||||
}
|
||||
}
|
||||
|
||||
// This is a copy of the one available in soong/android/util.go, but depending
|
||||
// on the android package causes a cyclic dependency. A refactoring here is to
|
||||
// extract common utils out from android/utils.go for other packages like this.
|
||||
func sortedStringKeys(m interface{}) []string {
|
||||
v := reflect.ValueOf(m)
|
||||
if v.Kind() != reflect.Map {
|
||||
panic(fmt.Sprintf("%#v is not a map", m))
|
||||
}
|
||||
keys := v.MapKeys()
|
||||
s := make([]string, 0, len(keys))
|
||||
for _, key := range keys {
|
||||
s = append(s, key.String())
|
||||
}
|
||||
sort.Strings(s)
|
||||
return s
|
||||
}
|
||||
|
||||
// String emits the Soong config variable definitions as Starlark dictionaries.
|
||||
func (defs Bp2BuildSoongConfigDefinitions) String() string {
|
||||
ret := ""
|
||||
|
Reference in New Issue
Block a user