3 ms·
Also, a regex will replace matching strings in incorrect places (like a string literal that happens to contain Go code). You can design your regex around this,
by chimeracoder 14y ago
Also, a regex will replace matching strings in incorrect places (like a string literal that happens to contain Go code).
You can design your regex around this, but at some point, you'll end up just reinventing a Go parser inside a hideous, unmaintainable regex. So you might as well just use gofmt.