Introduction
Welcome readers! We hope that you are doing great.
Go(also known as Golang or Go language) is a statically typed, compiled programming, an open-source programming language used for general purposes designed by Google in 2007. The main intention of creating Go was to design a programming language to address criticism of other languages by keeping their characteristics the same.
Now Go is widely used at Google. Even many other organisations are opting for Go. It is also used in many open-source projects.
If you want to learn more about Go, then follow these articles, Go, What is Golang?, Introduction to Go.
Today, we will be discussing the Anonymous Structure and Fields in Go.
This blog will help you to extend your knowledge about the Go. So, without further ado, let’s start our discussion.
Structure in Golang
A structure in Golang is a user-defined type, which allows you to combine a group of elements, possibly of different types, into a single type.
Structures are used to represent different types of records and real-world entities. This concept is somehow similar to Classes in Object-Oriented Programming.
Syntax
If you want to learn more about structs, follow this article Structs in Go.