I assume you mean a live goldfish.
Just like everything else you swallow, the goldfish floats around in your stomach in an acid bath. It gets digested and after it provides your boy with nutrition, what's left of it passes through your intestine and is pooped out. Since it is small, it's not going to have any bones that are too big to survive the digestion process, so it's no big deal. It was a big rage in the 50's and college kids were having contests to see who could swallow the most in one sitting. The gross out factor would get to some of them and they would blow the fish back up, but for the most part the goldfish would just be food. Think of it as sushi! I'm sure you'll get people who will say they did it and they could feel the fish moving around. Don't let that scare you. Half of thse people will be lieing and probably just watched somone else do it. Bon Appetit.