Welcome To Golang By Example

Menu
  • Home
  • Blog
  • Contact Us
  • Support this website
Menu

Naming conventions for variables and constant in Go (Golang)

Posted on June 21, 2020June 21, 2020 by admin

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.
  • convention
  • go
  • naming
  • variable
  • Follow @golangbyexample

    Popular Articles

    Golang Comprehensive Tutorial Series

    All Design Patterns in Go (Golang)

    Slice in golang

    Variables in Go (Golang) – Complete Guide

    OOP: Inheritance in GOLANG complete guide

    Using Context Package in GO (Golang) – Complete Guide

    All data types in Golang with examples

    Understanding time and date in Go (Golang) – Complete Guide

    ©2025 Welcome To Golang By Example | Design: Newspaperly WordPress Theme