A goat fence.................... What an undertaking, LOL!
We got goats Spring 2011. We bought 95 pregnant Boers and Kikos. Most of our fencing was five strand barbed wire, which works great for cows, but causes a goat to barely pause before going through it or over it!
We've tried a few different fencing types. We've done three strand electric, which worked fairly well, so long as you kept the grass from growing up and grounding out the fence. Although there were always some stinkers that managed to get out with a little motivation (such as our freshly planted raspberry plants - Argh!).
We've added three strands of electric to a five strand barbed wire fence. This worked well, except for through the woods and the places where the barbed wire wasn't close enough to the ground and the goats would just go under. In the woods, the goats would "ride" the young trees (stand on their back legs, hook the tree under their armpit, and then come down on all four hooves and slowly walk along, eating all the leaves within reach). Sometimes the tree would get hung up in the fence, and ground out the electric. Also you had to keep the grass from grounding out the fence.
We've added three additional strands of barbed wire to a five strand barbed wire fence (one between the ground and the first wire, between the first wire and the second wire, and between the second wire and the third wire). This has worked really well for the bigger goats, but anything under 50-60 pounds can get through. But since this tends to be the babies, they never wander off very far from the fence before coming back in by momma for dinner, and then getting back out again in the morning.
But what we've found to work best and be fairly economical is "field fencing" with three strands of barbed wire. Put the field fencing an inch or two off the ground. Put one strand of barbed wire between the ground and the field fencing, to discourage them from going under. Put one strand in the middle to keep them from rubbing on and stretching out the fence. And we also put one strand a few inches above the field fencing, for cows. This fence has worked very well for us, it keeps in even the smallest babies. Only complaint is that the goats sometimes put their heads through the fence to nibble at whatever strikes their fancy, and then can't pull their head back out because of their horns. So you can either dehorn your goats (we don't, they make dandy handles for worming, etc.), in some way fasten a stick on their horns that prevents them from reaching their head through the fence (we do this for the repeat offenders, but the stick eventually falls off and needs to be replaced), or just go out and check the fenceline two or three times a day and free any stuck goats (or at a minimum, every day just before dusk). Although I will add that until recently we thought this was an undefeated goat fence. But in October our bottlefed 19 month old Kiko buck, Kuzco, proved otherwise. He thought breeding season should start in October, rather than November. After repeatedly catching him and putting him back in, and fixing every possible hole there could be, we finally caught him in the act - he was jumping over the fence! Not gracefully mind you, but he was getting over. I am still quite amazed he never injured his boy parts on the top strand of barbed wire.
But despite all this, we still have the goats. We originally got them for eating the weeds the cattle leave behind. And they also make high quality fertilizer pellets that they broadcast themselves all over the pasture, LOL.
Hope this helps.