#programming-languages
Read more stories on Hashnode
Articles with this tag
Creating errors with errors.New() function If we don't need a custom type for an error, and we can work with a single error type then we can use...
Error is a result of unexpected circumstances or abnormal behaviour of the program. For example, a network connection error, a user entering incorrect...
Type assertion Type assertion is used to get the underlying concrete value of the interface variable. i.(Type) this is the syntax of type assertion,...
In Golang, an interface is a set of method signatures. When any type defines all the methods from an interface then that type implements the...
Nested Structs Go allows us to use a struct as a field of another struct, this pattern is called nesting. A nested struct can be defined using the...
What is Struct? A struct is a sequence of named elements, called fields, each of which has a name and a type. Field names may be specified explicitly...