Hogs and Varmints....
First thing that comes to mind is .243 Winchester.
It's plenty of gun, if you select the right bullet.
... And the .243 has factory ammo perfectly suited to both of your intended purposes, where many other cartridges require handloads to accomplish one of the duties.
My go-to rifle is a .270 Winchester, which is also my best jack-of-all-trades rifle. It'll do everything from small game, to varmints, to big game, to large big game; from short range, to long range. But.... I have to hand load for many of those applications. The factory ammo just doesn't exist, or is traveling at a velocity I don't like.
I will say; a 3,500 fps 100 gr Speer "Bucket Mouth" Hollow Point impacting prairie dogs, out of the .270 Winchester, is one of the most impressive sights I have ever seen. The only thing that beats it in Red Mist factor, is a 40 gr HP out of a .220 Swift. The .243 does fantastically well, but the high velocity .270 Win 100gr load is breath taking.