// ReplicaOrMaster returns the replica DB if available, otherwise the master.
ReplicaOrMaster returns the replica DB if available, otherwise the master.
// ReplicaOrMaster returns the replica DB if available otherwise the master .
func (db *EmailDB) ReplicaOrMaster() *sql.DB {
	if db.ReplicaDB != nil {
		return db.ReplicaDB
	}
	return db.DB
}
func ( db * EmailDB ) ReplicaOrMaster ( ) * sql . DB { if db . ReplicaDB != nil { return db . ReplicaDB } return db . DB }
ReplicaOrMaster returns the replica DB if available, otherwise the master.
ReplicaOrMaster returns the replica DB if available otherwise the master .