Goats could certainly be trained like dogs to stay in the fence area, but these electric fences do not keep predators out. This is what I would be concerned with. You will see lots of posts on goat web rings that discuss and show pics of their goats killed by neighbor dogs, feral dogs, etc.
I've used underground fences before with my dogs, but I stopped for two reasons. First, we have coyotes and these fences certainly do not stop the coyotes, nor did they stop the neighbor dogs from coming on my property and attacking my dogs. Second, I had a dog who would take the shock to run after a rabbit, but then would not come back into the yard and would sit outside the fenceline and wait for us to come and get him.
I've had goats for 20 years, so I've had alot of experience keeping them in fences and keeping predators out. Goats need to be out browsing most of the day to stay healthy. I cannot stay outside and watch them all the time to keep them safe.
Goats are escape artists. They can jump 4 foot fences when they are little, without a problem. They can squeeze their heads out of small holes in the fence, then can't get them out, especially if they have horns. They will crawl under a fence if they can get their head under it. They are avid climbers and like to be up high on anything. They can even climb trees, if they can find a way to the first branch.
My advice to you is to get a woven wire fence, at least 4 foot tall with the squares about 6'" square. You have to use electric, one low so they don't crawl under the fence. They are herd animals, so you need to have them with other goats, sheep, horses, donkeys, llamas, or other herd animals.
Carmel