How to Convert Golang Int to String

How to Convert Golang Int to String

Go provides numerous different types to represent the numbers. When we speak of numbers, we divide the numbers into two different types: integers floating-point numbers. Golang integer has two types. signed integer: int8, int16, int32, int54 unsigned integer: uint8, uint16, uint32, uint64 Golang string is a sequence of variable-width characters where each character is defined … Read more

How to Create a Byte Array in Golang

How to Create a byte array in Golang

Go has integer types called byte and rune epithets for uint8 and int32 data types. In Go, there is no char data type. Instead, it uses byte and rune to represent character values. The []byte and string in Go are small headers pointing to data that have lengths suggesting how much data is present. The []byte has two lengths: The current length of the data. Capacity. A byte … Read more

Golang Itoa: How to use strconv.Itoa() Function

Golang Itoa - How to use strconv.Itoa() Function

Go provides built-in support to execute conversions to and from string expressions of basic data types using the strconv Package. The most familiar numeric conversions are converting string to int using Atoi() and converting int to string using Itoa() function in Go. In this article, we will learn what is strconv.Itoa() function and how to … Read more