Cloudy eye can be treated and prevented by doing regular water changes and keeping water chemistry in proper levels reducing stress and chance of goldfish diseases and bacterial infections from occuring in the first place.
A water change or two and treatment with Meltafix should cure it.