Good morning Pete! You were right, this goldfish thread was hard to find. But now I found it thanks to you.
I feed my goldfish all sorts of different food in rotation. Flakes, pellets, frozen blood worms and
brine shrimp, home made gel food, frozen peas, seaweed, etc.
Goldfish sucking air trying to eat food at the surface, and also dry food expanding in their stomach could become a problem, usually for the fancy or the fat bellied types. Their internal organs are already so compacted and under pressure that they are more sensitive and prone to swim bladder disease. They also experience constipation. Commercial food nowa days are usually high in protein and have some nutrient value to keep the fish fed, but not all the nutrients they like to get. Goldfish are omnivorous and their diet is similar to our food pyramid only the under water version. Sure I can live on McDonald's only, but I don't want to find out for how long.
Pellets--floating, sinking, slow sinking--are less messy compare to flakes that get scattered about in the tank. I like to be safe and soak them for a little first. What I do with the flakes is that I pinch some with my fingers and submerge it under the surface, then I let my fish come to my fingers and peck as I slowly release the flakes. Many goldfish love frozen peas--it's a good and easy addition to their diet. Just let them thaw, pop them out from the outer shell, and cut them up if your fish are small.
Overall, goldfish benefit from eating variety of food. After a rainy day, I'd go out on the yard and look under pots for earthworms. It's a special treat, but they have to eat their peas, too!