SetConnMaxLifetime如何在Golang数据库/ SQL上工作

I am confused by the documentation of the func (db *DB) SetConnMaxLifetime(d time.Duration) that states:

SetConnMaxLifetime sets the maximum amount of time a connection may be reused.

Expired connections may be closed lazily before reuse.

Does this mean that idle connections are closed after d has expired or that connections are closed in any case (either idle or not) after d has expired like SetConnMaxLifetime suggests? Also what does closing lazily mean in this case and is it possible to implement a timeout using this method?

No, sql.DB will not close an active connection. The cleaner only runs over the free connection pool.