Overview of Data Types

This lesson tells us about the type of data that Go can handle.

We'll cover the following


Variables contain data, and data can be of different data types or types for short. Go is a statically typed language. It means the compiler must know the types of all the variables, either because they were explicitly indicated, or because the compiler can infer the type from the code context. A type defines the set of values and the set of operations that can take place on those values. Here is an overview of some categories of types:

Types Examples
elementary (or primitive) int, float, bool, string
structured (or composite) struct, array, slice, map, channel
interfaces They describe the behavior of a type.

Create a free account to view this lesson.

By signing up, you agree to Educative's Terms of Service and Privacy Policy