Golang Data Types Every Beginner Should Know!

Manpreet Singh
3 min readJul 3, 2022

Welcome back! Golang is an awesome programming language with a ton of capability, if you’re new to Golang, check out the link below to learn more about it:

So, let’s take a look at some of the most important Golang data types that every developer should know!

String

First of all we have string, these are string values, some common examples of these could be names, sentences, different things like that, to declare a string, we can assign it to a variable like this:

var name string = "Hi"

When a variable is in double quotes like that, Golang reads it as a string.

Int

Next up we have int’s, these are whole numbers, think of number of people, number of dogs, you can’t really count half a person, right? In cases like this, we would use an int value. To declare an integer, we can use the following command:

var number int = 15

Float

--

--