GOLANG: Variables and Data Types
Data Types and Variables in Go
In this article, we are going to look at some of the basic data types in Go and how we can declare variables and constants. Despite being a statically typed language, Go provides easy syntax to declare variables without explicitly defining data types.
Published in
9 min readJul 8, 2018
Variables & Data Types
What is a variable?
A variable is a storage unit of a particular data type. You can give assign a name (label) to this storage unit. A variable must be defined with the type of data it is holding. For example, string
is a data type provided by Go to store character or text data.
Data types
There are several data types in Go. They are as following.