func AddRepoUsages(useRepos []*build.CallExpr, repos ...string)
AddRepoUsages adds the given repos to the given use_repo calls without introducing duplicate arguments. useRepos must not be empty. Keyword arguments are preserved but adding them is currently not supported.
func AllProxies(f *build.File, proxy string) []string
AllProxies returns the names of all extension proxies (i.e. the names of variables to which the result of a use_extension call is assigned) corresponding to the same extension usage as the given proxy. For an isolated extension usage, a list containing only the given proxy is returned. For a non-isolated extension usage, the proxies of all non-isolated extension usages of the same extension with the same value for the dev_dependency parameter are returned. If the given proxy is not an extension proxy, nil is returned.
func NewUseRepo(f *build.File, proxies []string) (*build.File, *build.CallExpr)
NewUseRepo inserts and returns a new use_repo call after the last usage of any of the given proxies, where a usage is either a use_extension call or a tag definition.
func Proxies(f *build.File, rawExtBzlFile string, extName string, dev bool) []string
Proxies returns the names of extension proxies (i.e. the names of variables to which the result of a use_extension call is assigned) for the given extension with the given value of the dev_dependency attribute. Extension proxies created with "isolate = True" are ignored.
func RemoveRepoUsages(useRepos []*build.CallExpr, repos ...string)
RemoveRepoUsages removes the given repos from the given use_repo calls. Repositories are identified via their names as exported by the module extension (i.e. the value rather than the key in the case of keyword arguments).
func UseRepos(f *build.File, proxies []string) []*build.CallExpr
UseRepos returns the use_repo calls that use the given proxies.