I am not certain in which way I should represent related string constants, namely language codes, in Go.
The only occurrence in the standard library, of which I am aware, uses untyped string constants and prefixes the variable names with the "type".
const LanguageEnglish = "en"
There is the possibility to declare an extra type.
type Language string const English Language = "en" // or const LanguageEnglish Language = "en"
But any arbitrary string can be converted to the type anyways, so I can not remark any advantage.
Language("en")
Essentially two questions arose from the prior observations:
Should the string constants’ names be prefixed by their "type"?
What are the benefits of using a custom type in contrast to untyped string constants?