The Necromancer skill bonuses to pets: The skeleton mastery applies to classic necro’s Skeletons and Revived Pets and all other pets
The Golem Mastery applies to the Golems and all other pets, the other Golem passives (vigor/flame) apply to all pets.
It’s a bit vague, also because the tooltips do change, while they do not apply.
I think it has to do with GD pets not having a ‘type’ assigned to them but the druid/necromancer pets do.
So in short: every GD pet will be boosted by the pet bonuses, while not every D2 pet will be boosted.