Flakes are not good for goldfish. They can have swimbladder issues if they are fed flakes. Slow sinking pellets are a good staple but goldfish need lots of variety on their diet to thrive. They need quite a lot of vegetable matter so vegetables and algae wafers are good.
Mine like peas best. Just defrost them and take off the shell and chuck them in the tank. Try different kinds. Some vegetables may need to be boiled for a few minutes first so they are soft enough to eat.
Spinach and romane lettuce can also be good for the goldies. Just blanch them and attach them to a veggie clip. I personally use omega one goldfish pellets and my Goldie loves them. Make sure you supplement them with veggies and give them peas at least once a week