Standard library / time

time.June

Named month constant representing June; numeric value 6. Prefer the name to a magic number. Expected stdout: 'June 6\n'.

Formal Syntax & Structure

go syntaxgo
const June Month = 6

Working Example

Example Snippetgo
package main
import (  "fmt"  "time")
func main() { fmt.Println(time.June, int(time.June)) }
Go Reference