title: Converting bool to *bool in go
body: <p>With the following code:</p>
  <pre><code>var example *bool
  example = true
  log.Print(example)
  </code></pre>
  <p>I have the following error <code>cannot convert true (untyped bool constant) to *bool</code></p>
  <p>I manage to solve it declaring a new variable <code>truevalue</code>:</p>
  <pre><code>var example *bool
  truevalue := true
  example = &amp;truevalue
  log.Print(example)
  </code></pre>
  <p>But I imagine there is a better way to do it, without declaring any new variables.</p>