Railguns haven't progressed to a combat-capable level of technology yet. The rails wear out too fast, and nobody (to my knowledge) is working on designing railguns intended for large volumes of fire. There are naval cannon designs in the works, but they wear out pretty fast. With an A-10, you'd want the barrels to last (at a bare minimum) thousands of rounds so that even in a high ops tempo situation you could go a month without replacing them.
Most railguns are good for ten rounds before the rails need replaced. And that is including a decrease in efficiency towards the end of that ten rounds, due to the current melting the rails and increasing the effective resistance of the armature.
Also, keep in mind that a railgun is a single-purpose weapon. It'd would be like arming a tank with only APFSDS rounds instead of a mix of APFSDS, HEAP, and cannister rounds. That railgun round will do an ungodly amount of damage to a single target, but it's not going to do much to a squad of infantry riding in a 7-ton truck. Oh, there'd be a lovely hole, and anyone that got hit would be amazingly fucked, but there's no way to stick an explosive round inside a railgun.
By necessity (and I mean "laws of EM physics") all railgun projectiles need to be non-ferrous and able to handle insane amounts of current. I did a fair bit of research into this a while back, throwing a 1-kilo projo with a diameter of an inch (for a long, high-BC dart) came out to something like 187,000 amps running through the projo, and that's just to get past the sound barrier with a 2-meter rail setup.
To actually break through a tank's armor, you're going to need a lot more than 1-kg copper dart. For metals, you absolutely cannot use anything has generates a magnetic field. While it's true that anything can be armor-piercing if it's moving fast enough, for practical reasons harder metals are better, and occasionally have fun properties like being pyrophoric on impact.
Also, to generate enough current fast enough, a bank of supercapacitors needs to be used, and those need to be built in a fairly specialized way to prevent the magnetic fields generated by the current in the wires, cables, and capacitors themselves from literally tearing themselves apart. I've seen videos of railguns firing where the capacitor bank tore itself apart, which is of course absolutely unacceptable inside a flying plane.
If I buy a house, guess what my first project is going to be?