You won't sucessfully house a Betta with a Goldfish.
Bettas, being TROPICAL, require a temperature between 25-30 celcius, Goldfish are Coldwater fish and prefer vastly lower temperatures. Goldfish are better off in outdoor ponds. They should not, IMO, be kept in aquariums.
For a Betta to accept a community setup, you should be looking at stocking fish such as Corys, Otos, smaller Plecs & Loaches and wisely chosen smaller Catfish (do not stock microglanis iherengi the South American Bumblebee Catfish unless you want your Betta to get a crew cut).
I would recommend steering clear of all Tetras, Gouramis, Male Guppies, Mollys, Swordtails, etc. Anything that is brightly coloured or is known to fin nip should be excluded.
I have generally had sucess with FEMALE guppies, WCMM and Kribs in a Betta community setup. However, it is wise to provide lots of vegetation, especially if you decide on Kribs as they can get territorial in breeding season.