While sheep and goats are different, I can give you my experience with my sheep.
As a flock -- My sheep come when I call them. When other people call them up to eat, they don't listen

They come running as fast as they can to get their dinner. After they're done eating, I can walk around the field and they will all follow me. Once they realize I don't have any more feed, they will walk off on their own and start grazing. Sometimes a sheep or two will stay with me wanting to be pet or sniffing me to see if I have any more food on me. Sometimes I do, but mostly I don't. As a flock, they do not approach strangers or let strangers approach them. They high tail it out of wherever they are to get away from the people they don't know.
Individually --
* My oldest ewe I got when she was 2-3 months old. She was penned up with other lambs for a couple months before being turned out with the rest of the flock, to get her friendly. She would walk up to me, but she was never friendly enough that I could walk up to her. She is still that way. It's my attention on her terms. She will walk up to me when I have food, but she doesn't always let me touch her. She does not walk up to people she doesn't know and will not get close to people she doesn't know. She is old & wise enough to know my 'sheep catching tricks' so as she's gotten older, she's gotten much more difficult to catch. (She's 7 this year.) Last October I tried weighing her and to catch her took two hours with three people. I even had feed!
* My other ewes I've had since the day they were born. They let me walk up to them, but I'm not always allowed to touch them. Sometimes when they're eating they will let me touch them but most of the time they are off limits for me to pet. After they are eating, some will walk up to me and put their nose in my hand and that tells me they want to be scratched. So I will sit there for what seems like an eternity scratching the side of their face, their neck, their briskets, etc and they just stand there grunting lol. Sometimes I spend two hours out there and it amazes me that I had been petting the sheep for that long! But usually it is about 5-10 minutes that they are willing to stand around.