If I need to do compile-time pre-computation, I'd probably do it using "code generation" using something like this: https://github.com/linzhp/codegen_example/tree/master
* integrated into bazel rather than go-compiler-hacking * your "normal" code just imports the result - which can be go-to-definition-ed to see the generated code