A lot wrong here, and a lot of unanswered questions.
How long have you had these fish?
A 1 gallon tank isnt big enough to keep any fish in, let alone goldfish. There is not a single species of fish i would recommend to put in a 1 gallon tank.
Goldfish get big, like 12 inches long. And if they are kept in a suitable living environment they will live decades.
If we assume your goldfish are fancy type goldish then a single goldfish needs a 20 gallon tank as a minimum. Each additional goldfish an additional 10 gallons. So your goldfish needs at least a 50 gallon tank if they are fancy type goldfish. If they are comet type an even bigger tank is needed. 30 gallons for a single comet GF and again another 10 gallons for each additional GF.
There are so many health issues from keeping GF in such a poor living environment its not even worth going onto. There is zero possibility of keeping healthy goldfish in a 1 gallon tank.
- Get a much bigger tank immediately. Or
- Return the fish to where you got them and keep a few shrimp or a snail in your 1 gallon tank.
Im going to post a link to a thread discussing what to do if you find yourself with goldfish and dont know what to do with them.