Fix string concatenation error

Fix an error caught by golint that prevents using go test.  string(int)
produces a rune, not a string representation of the int.  Use fmt.Errorf
instead to format the string.

Test: go test
Change-Id: I4c2e1e30a0f1b3dc24afd123c38c4e41c2abb47a
This commit is contained in:
Colin Cross 2020-07-06 17:41:08 -07:00
parent 0ae555df1a
commit afa6a77c64
1 changed files with 1 additions and 1 deletions

View File

@ -911,7 +911,7 @@ func newOsTypeSpecificInfo(ctx android.SdkMemberContext, osType android.OsType,
if commonVariants, ok := variantsByArchName["common"]; ok {
if len(osTypeVariants) != 1 {
panic("Expected to only have 1 variant when arch type is common but found " + string(len(osTypeVariants)))
panic(fmt.Errorf("Expected to only have 1 variant when arch type is common but found %d", len(osTypeVariants)))
}
// A common arch type only has one variant and its properties should be treated