Is it possible to include an external file as a string constant in go?

Viewed 456

I always wished it was possible to do something like this in C++:

const std::string fragmentShader = "
#include "shader.frag"
";

Obviously that doesn't work, and there is no way to do it in C++. But it is possible in go? i.e.

const fragmentShader string = `
<insert contents of shader.frag at compile-time>
`

The motivation should be obvious!

2 Answers
Related