I might be missing something but it seems that res.Close(context.Background()) should be called within ListCollectionNames. The cursor is not returned to the caller in this case so I think it should be closed internally.
If this function does need a cursor Close() call then special attention would need to be made to ensure the cursor is closed if an error is encountered while iterating the results. Currently, an error while iterating the results causes the function to immediately return the error.