Prepare for a type-safe OnceKey

Add an opaque OnceKey type and use it for all calls to Once in
build/soong.  A future patch will convert the arguments to
Once* to OnceKey once users outside build/soong have been updated.

Test: onceper_test.go
Change-Id: Ifcb338e6e603e804e507203c9508d30ffb2df966
This commit is contained in:
Colin Cross
2019-02-04 11:22:08 -08:00
parent 5cb5b093d1
commit 571cccfcbc
16 changed files with 206 additions and 32 deletions

View File

@@ -46,7 +46,7 @@ type overlayGlobResult struct {
paths android.DirectorySortedPaths
}
const overlayDataKey = "overlayDataKey"
var overlayDataKey = android.NewOnceKey("overlayDataKey")
type globbedResourceDir struct {
dir android.Path