title: Difference between fmt.Println() and println() in Go
body: <p>As illustrated below, both <code>fmt.Println()</code> and <code>println()</code> give same output in Go: <code>Hello world!</code></p>
  
  <p>But: how do they differ from each other?</p>
  
  <p>Snippet 1, using the <a href="https://golang.org/pkg/fmt/" rel="noreferrer"><code>fmt</code></a> package;</p>
  
  <pre class="lang-golang prettyprint-override"><code>package main
  
  import (
      "fmt"
  )
  
  func main() {
      fmt.Println("Hello world!")
  }
  </code></pre>
  
  <p>Snippet 2, without the <code>fmt</code> package;</p>
  
  <pre class="lang-golang prettyprint-override"><code>package main
  
  func main() {
      println("Hello world!")
  }
  </code></pre>