Type Conversion and Type Assertion in Golang - Everything You Need to Know (With Examples)
When programming in Go, using types is one of the most fundamental language features that we use. Occasionally, we will need to convert between types and interfaces. For example, we may need to convert an int type to a long type. Or maybe we have to convert a string to a []byte type. In this article, we will see how to convert between types in Go, and when to use type assertions and type conversions....