naming Archives - Welcome To Golang By Example https://vikasboss.github.io/tag/naming/ Sat, 20 Jun 2020 20:34:21 +0000 en-US hourly 1 https://wordpress.org/?v=6.8.1 https://i0.wp.com/golangbyexamples.com/wp-content/uploads/2021/05/cropped-go_border-1.png?fit=32%2C32&ssl=1 naming Archives - Welcome To Golang By Example https://vikasboss.github.io/tag/naming/ 32 32 159787465 Naming conventions for variables and constant in Go (Golang) https://vikasboss.github.io/naming-conventions-variable-constant-go/ https://vikasboss.github.io/naming-conventions-variable-constant-go/#respond Sat, 20 Jun 2020 20:33:43 +0000 https://vikasboss.github.io/?p=2358 Below are naming conventions for variables and constant in golang A variable or constant name can only start with a letter or an underscore. It can be followed by any number of...

The post Naming conventions for variables and constant in Go (Golang) appeared first on Welcome To Golang By Example.

]]>
Below are naming conventions for variables and constant in golang

  • A variable or constant name can only start with a letter or an underscore.
  • It can be followed by any number of letters, numbers or underscores after that
  • Go is case sensitive so uppercase and lowercase letters are treated differently.
  • The variable or constant name cannot be any keyword name in Go
  • There is no limit on the length of variable or constant name. But is advisable to have the variable name of optimum length.

The post Naming conventions for variables and constant in Go (Golang) appeared first on Welcome To Golang By Example.

]]>
https://vikasboss.github.io/naming-conventions-variable-constant-go/feed/ 0 2358