Constants in Golang

A const statement can appear anywhere a var statement can. Constants cannot be declared using the := syntax.

In Golang, all constants are untyped unless they are explicitly given a type at declaration:

const hw = "Hello World"
const country, code = "Moldova", 373
Untyped constants allow flexibility. They can be assigned to any variable of compatible type or mixed into mathematical operations.

Constants are typed when you explicitly specify the type in the declaration:
const my_typed_const int = 20
With typed constants, all the flexibility that comes with untyped constants is lost.