Don’t Go To Casting Hell; Use Default Native Types in Go

hell red sky

Go is strongly typed, and with that, we get many options for simple variable types like integers and floats. The problem arises when we have a uint16, and the function we are trying to pass it into takes an int. We find code riddled with int(myUint16) that can become slow and annoying to read. In … Read more

Golang Conversions – Ints To Strings And Strong Typing

photo 1500589177368 c810ea3db799

Go is a strongly typed language, which means at any point a developer should know exactly what type of value they are dealing with. For example, if we have a function that prints a string, we can’t just give it an integer and expect it to work. We have to cast it to a string … Read more