internal: add RemoveBuildContexts

This was added in CL 313596, but CL 313598 was merged earlier.

Change-Id: Ia60ce11098347ab5dcb873770a131edd7a495209
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/314689
Trust: Julie Qiu <julie@golang.org>
Run-TryBot: Julie Qiu <julie@golang.org>
Reviewed-by: Jonathan Amsterdam <jba@google.com>
TryBot-Result: kokoro <noreply+kokoro@google.com>
This commit is contained in:
Julie Qiu 2021-04-28 12:41:33 -04:00
Родитель 459cbb37ce
Коммит 8f262bafc5
1 изменённых файлов: 6 добавлений и 0 удалений

Просмотреть файл

@ -123,3 +123,9 @@ func (us *UnitSymbol) SupportsBuild(build BuildContext) bool {
func (us *UnitSymbol) InAll() bool {
return len(us.builds) == len(BuildContexts)
}
// RemoveBuildContexts removes all of the build contexts associated with this
// unit symbol.
func (us *UnitSymbol) RemoveBuildContexts() {
us.builds = map[BuildContext]bool{}
}