This is where some of us differ. I would quickly close the distance for two reasons:
One to ensure no friendlies would be able to move laterally into my line of fire and two to also ensure I had a backstop for the six rounds I pump into the knife wielding bad guy.
I would advocate moving forward in a gun/knife fight (against punks) which is what 99.999% of what the Law Enforcement faces today.
Todays LEO’s have, IMO, been taught tooooo much in the “defensive” tactics department. There are times when, in order to save lives that the street cop goes on the “offensive”.
Lose your focus, even for a moment, and you could lose your life. If you are “moving to cover” and do not have someone else to cover your movement you will lose focus. Stay focused on your target, always move in a decisive manner, and only move as fast as you can accurately engage your target.
If knife fighting was all that lethal the US Military would have a Field Manual on knife fighting. Would I ever use a knife in a fight? You bet, when I run out of bullets....