Type Assertions vs Type Conversions in Golang
Type assertions and type conversions seem to be a confusing topic in Go, since they both seem to do the same thing. In this article, we will see how assertions and conversions are actually quite different, and go under the hood to see what happens when you use each of them in Go. First, let’s see what they look like… This is a type assertion in Go: var greeting interface{} = "hello world" greetingStr := greeting....