4 ms·
You are gravely mistaken. MustCompile* if it fails panics at runtime. Go doesn’t have a general purpose compile time execution feature. That’s all Must does -
by fuckstick 4y ago
You are gravely mistaken. MustCompile* if it fails panics at runtime. Go doesn’t have a general purpose compile time execution feature.
That’s all Must does - is make runtime panic look nice.
* MustCompile if you are unfamiliar - the compile refers to the compilation of the regular expression - which is always done at runtime.
- bogota 4y agoAh yeah i was remembering wrong. I normally have this setup as a package level variable and then build and test. But yes its on the test that it’s actually caught