Calling Close function from API caused a recursive call to itself as the
underlying module was using a function with same name. Rename the
internal close function to avoid this.
Change-Id: I05c3ca8e79fb5f30cae81917f56efacbd1797768
Signed-off-by: Marco Tallskog <marco.tallskog@nokia.com>
return &db
}
-func (db *DB) Close() error {
+func (db *DB) CloseDB() error {
return db.client.Close()
}
type iDatabase interface {
MSet(pairs ...interface{}) error
MGet(keys []string) ([]interface{}, error)
- Close() error
+ CloseDB() error
Del(keys []string) error
Keys(key string) ([]string, error)
SetIE(key string, oldData, newData interface{}) (bool, error)
}
func (s *SdlInstance) Close() error {
- return s.Close()
+ return s.CloseDB()
}
func (s *SdlInstance) setNamespaceToKeys(pairs ...interface{}) []interface{} {
return a.Get(0).([]interface{}), a.Error(1)
}
-func (m *mockDB) Close() error {
+func (m *mockDB) CloseDB() error {
a := m.Called()
return a.Error(0)
}