Your Question

I'd like to use read/write connection splitting with the DBResolver. When using this plugin as-documented, the db.Use() function attempts to open a connection to each Source and Replica immediately, then adds them to connection pools.

I'm using this in a setting where it isn't known at DB initialization time if the queries will be read, write, or both. Therefore, I'd like to avoid opening a connection until a query is actually run. Is there any way to achieve this, to prevent the DBResolver from opening both connections when it's registered?

The document you expected this should be explained

https://gorm.io/docs/dbresolver.html

Expected answer

A config option that determines whether connections are opened immediately, or lazily when a query actually needs a connection.