Get date in golang like "2018-07-13" : <p>how to get date in golang like this formate "2018-07-13"</p>

<p>main.go file</p>

<pre><code>package main

import (
    "fmt"
    "time"
)

func main() {
    fmt.Println(time.Now())
}
</code></pre>

<blockquote>
  <p>$ go run main.go</p>
</blockquote>

<p>otuput:</p>

<blockquote>
  <p>2018-07-13 21:25:16.796379489 +0500 +05 m=+0.000120455</p>
</blockquote>

<p>how to write function to return date in string like this formate "2018-07-13"?</p>
