The building blocks of Golang are types, functions, and packages—in contrast to classes in object-oriented languages like Java. However, three of the four concepts of OOP (encapsulation, abstraction, and polymorphism) are available, and the missing type hierarchy is replaced by interfaces and duck typing.