what kind of goldfish...?? i would not recomend putting any kind of goldfish in a 10 gallon tank... maybe a china doll, or a sempai dwarf... but i don't think you will ever find any of those types in USA...
bettas do really well in larger tanks... but they don't like alot of current in the tanks... especially if they can't make thier own bubble nest up top... and goldfish need lots and lots of water movement and filtration... for a 10g tank i would get a filter that's at least 150gph...
Watch the ammonia level. But my friend put a betta with 2 large glodfish(in a tank way too small) and the male betta is doing great. Believe it or not for almost 2 years now.