It honestly depends on the goat and how much time you spend with them. I had a similar situation last summer, and I was able to train mine to run ahead of me to the barn, but they would scatter once they got to the pen, I had to give them grain in the pen to get them to go inI'm more familiar with horses than goats, so apologies if this is a weird question, but are goats very hard to fetch from the pasture and lead around? While the three-sided shelter is in a pasture, the barn isn't directly connected to a pasture. It's not far, just a short walk, but keeping the goats in the barn would require me to turn them out and bring them back in every day. Which I totally don't mind doing if the goats are at least semi-cooperative haha.

But it can be done! Honestly with the number I had at the time it was easier to run everyone at once than it was to use leashes, but leashes might be easier if you only have a few goats.