It is not true that a goldfish will only grow to the size that fits its container.
Please do some web research on goldfish care so you know what you need to do for them.
sniplet of info from one of the links I got back from google:
Goldfish do have the potential to grow quite large. Straight-tailed varieties have been recorded to around 40 cm, and other varieties have been reported at over 35 cm. However, most specimens will not reach these sizes! The growth rate of goldfish is variable, and their final size dependent on the conditions in which they are kept.
That said, it is a myth that a goldfish will grow only to the size of their tank. If a goldfish is kept in a small tank, fed only a small amount once daily, and the water changed regularly, it will grow only very slowly and may live for several years, reaching a maximum size of maybe eight to ten centimetres. It is true that the growth of a goldfish may be somewhat stunted in a small tank - a high nitrate level is known to stunt growth - but growth is slowed, not stopped altogether. However, if fed too much, or if kept in a tank that is not sufficiently filtered or maintained, a goldfish will simply grow to the point where its tank will not support its wastes and will succumb either to poisoning as a result of waste build-up or to disease caused by poor water quality.