Did a quick search of the state package on the 2.2 branch. The following functions aren't closing the iterator:
state/clouds.go:
func (st *State) Clouds()
state/cloudcredentials.go
func (st *State) CloudCredentials(user names.UserTag, cloudName string)
state/lease/client.go
func (client *client) readEntries // doesn't close iterator if leaseDoc.entry() returns an error
state/prune.go
The deleteInBatches function doesn't close the iterator, nor do either of the call sites.
state/upgrades.go
func updateLegacyLXDCredentialsOps(...) func UpgradeNoProxyDefaults(st *State) error func RemoveNilValueApplicationSettings(st *State) error
Did a quick search of the state package on the 2.2 branch. The following functions aren't closing the iterator:
state/clouds.go:
func (st *State) Clouds()
state/cloudcred entials. go
func (st *State) CloudCredential s(user names.UserTag, cloudName string)
state/lease/ client. go
func (client *client) readEntries // doesn't close iterator if leaseDoc.entry() returns an error
state/prune.go
The deleteInBatches function doesn't close the iterator, nor do either of the call sites.
state/upgrades.go
func updateLegacyLXD CredentialsOps( ...) efaults( st *State) error pplicationSetti ngs(st *State) error
func UpgradeNoProxyD
func RemoveNilValueA