Go Constants

1 · Maksym Postument · Nov. 12, 2022, 7:41 a.m.
Summary
Hello! Let’s learn what constants are, how they should be named in golang, and also what iota is. Naming If you are familiar with constants in other programming languages, you know that their names usually include only capital letters, for example, PORT_NUMBER. In golang, we cannot do this because by making the first letter uppercase, we will immediately make the constant available to other packages. Therefore, in golang, we name constants in the same way as variables portNumber or PortNumber if...