There are prescription goggles that are specially designed for people who have vision problems. So you can get prescription swimming goggles. Some type of goggles have bifocal lenses which can help people who are both nearsighted and farsighted to see well.
It's easy. A pair of prescription swim goggle can solve your vision problem. What you shall to do is have a eye exam and get your prescription. Then use it to buy prescription swim goggle that both for eye protection and vision aids.