It depends what you’re looking for.
Goats are more like cats – only semi-domesticated. In some ways, that’s great – they’ll look after themselves. In others, it’s not so good – they’ll get into the veg garden or the laundry, and destroy all before them. They can be super-affectionate one minute, and charging at you malice aforethought the next. Just like cats, really.
Milk-goats are probably more domesticated, less damaging, and less homicidal than most. But they need to be milked at least once a day unless you want to deal with kid goats as well.
Sheep … well, temperament varies with breed. Blue-Faced Leicesters and Wensleydales are aristocrats and you are the peasant servicing their every need – they’re the cats amongst sheep breeds. Southdowns, Hebrideans and Valais Blacknoses are puppy-affectionate, if you’re willing to be a hands-on shepherd and spend time with them; they’re also great with children. The more feral Soay, Ronaldsay and Boreray are like wary domesticated dogs, or foxes. You can win their trust up to a point so they’ll come to you, but you will never be ‘pack’, and they will dash off at the first hint of something out of the normal.
However, virtually any sheep can be a pet provided you take them in and bottle-feed them from birth: ideally, pick a ewe or a castrated male – never a full ram, as they’re just as homicidal as goats, and often three or four times the size. Here’s a sheep that was raised with pups:
Its demeanour, body language, and movement is all dog. Hopefully, these dogs have all been trained not to jump on people – this boyo is only half-grown.
The downside is that sheep often require more veterinary input, and, of course, the shearing – unless you get a feral breed that naturally sheds its fleece, and are prepared to work hard on charming them.