I no longer have problems with my goats escaping from my pastures. I built my fences using 8ft 4x4 sunk 2 ft into the ground and 6 ft above. I then set 3 2x4 rails between each post, 1 at ground level, 1 at 29 inches, and the top one at 59 inches. That makes a fence 5 ft 2 in high. I then strung 2x4x5ft welded wire and strung it on the posts and rails. I'm going to be running a electric fence wire at the 5.5 ft mark.
So far it has kept the goats in and the Racoons and Coyotes out. The fence don't hold water but it does hold a goat. One of the reasons is that all trees, stumps, or other things have been removed for a distance of at least 10 feet back from the fence. Give them a method of gaining a little height around the fence line and they'll soon be walking the rails or jumping over. And no space between the bottom of the fence and the ground, if a goat or a kid can get under the fence the rest of the herd will break the fence down to follow it.