I have used two fences with good success.
The firs fence an the one I preffer for smaller areas is a sturdy 4 foot high woven wire fence. My fence has 4"x2" spaces and is held up by sturdy t-posts. Not the cheap t-posts, bu the good strong ones. The neighbors have a huge chow that just bent the weaker posts down and killed the chickens. I use this fence for my chicken pen as well.
The other fence I use is an electric fens. The electric fence is 4 feet high and the strands are about 8" a part. This keeps the goats or dogs from squezing through it without hitting the fence and thinking twice about it. The fence also has a good strong charger. Goats have thick hides and electric fence can sometimes not effect them well if it's not a strong one.
I've found that a four foot fence is a good hight to keep them in. Electric fencing doesn't always work on wool sheep, cause it doesn't shock them through wool. Any fence shorter than 4 feet tall will not hold a goat, but may hold a sheep depending on the size of the sheep.
I don't use a LGD i use a Llama Guardian which is a bit more effective in my experience. It is so hard for me to find a good dog around here. Our dogs are afraid of everything, but the llama chases everything off. He is a very good llama and even defends the chicken coop and rabbit barn. He also eats a lot less than a dog. About a cup of grain a day along with his grazing, our pasture is pretty lush, and about a quarter flake per day of regular grass hay.
Donkeys are generally anywhere from 500-1000 dollars to purchase depending on the area you live in.
Llamas are generally about 100.00 aound here on average, so it was cheaper to go that way.