DevOps Articles

Curated articles, resources, tips and trends from the DevOps World.

Don't Go To Casting Hell - Use Default Native Types in Go

3 years ago blog.boot.dev
Don't Go To Casting Hell - Use Default Native Types in Go

Summary: This is a summary of an article originally published by the source. Read the full original article here →

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.

Made with pure grit © 2024 Jetpack Labs Inc. All rights reserved. www.jetpacklabs.com