What is the Model of the gun, and what do you intend to do with it ?
If it is a Common, non collectable model, it can be filed out and refinished for a shooting rifle.
The pits can be done properly, and the rifle will look fine.
But you do not just go Sanding , or Draw filing at random.
There are ways to do it and the barrel will not look like it was filed out.
Your stamping and lettering will probably be gone in the reshaping, because you have to Blend in the rest of the barrel around the bad areas.
So if you want to have a Refinnished Shooter, seek out someone with the proper skills to refinish the gun.
If it has collectors Value, leave it alone.