improve doc for dataprovider Close method

the method is used in test cases, it assumes that the dataprovider
is initialized and it is not safe Initialize/Close from different
goroutines
This commit is contained in:
Nicola Murino 2019-09-29 08:38:09 +02:00
parent 0b4ff97a1a
commit fb8ccfe824

View file

@ -259,7 +259,9 @@ func GetUserByID(p Provider, ID int64) (User, error) {
return p.getUserByID(ID)
}
// Close releases all database resources
// Close releases all provider resources.
// This method is used in test cases.
// Closing an uninitialized provider is not supported
func Close(p Provider) error {
availabilityTicker.Stop()
availabilityTickerDone <- true