How to disable "use of internal package not allowed"
<p>I have a go program that inspects a large repository, selects some packages of interest, and then generates a new main.go file that has:</p>

<pre><code>import(
  _ (package of interest here)
  _ (another package of interest here)
  ...
)
func main() {...}
</code></pre>

<p>The main is interested in some values these packages set in their <code>init</code> method. </p>

<p>However some of these packages have (...)/internal/(...) paths and so I get <code>use of internal package not allowed</code> when trying to run the generated main.go.</p>

<p>Is there some compiler / linker / other flag that disables the <code>internal</code> path check?</p>