Take a Formatted User Input in Golang (Extract Data)
Oh we know the input format and we want to extract data from some exact position of that, Scanf from fmt package will help us:… Read More »Take a Formatted User Input in Golang (Extract Data)
Oh we know the input format and we want to extract data from some exact position of that, Scanf from fmt package will help us:… Read More »Take a Formatted User Input in Golang (Extract Data)
If your string contains some non-regular characters (like Chinese or Russian or currency signs) then you can calculate the length of your string using these… Read More »Go: How to Get the Length of a String With Non-regular Characters
When you read a response it is in []byte format but you can convert it to string simply by using string() function: Use this snippet… Read More »Golang: Get HTTP Response as a String
Yes, a string is a slice then you can iterate over it easily. Take a look at this snippet which helps you to reverse a… Read More »Reverse Function for String in Golang?
You are facing an error that says you are not using the correct type, a slice of string! Yes, you are sending an array (which… Read More »Go Error: Argument Problem for strings.Join
Another day, another type conversion in Golang 🙂 Today we want to convert a number from string into int64 type, using ParseInt method from strconv… Read More »Convert string to int64 in Golang
Remembering the conversion solutions in golang is not easy, but the fmt package is always with us. By using the Sprintf method it is super… Read More »How to Convert Float to N Decimal Place String in Go
Simplest way to convert a string to a slice of bytes: A set of examples to convert string to []byte:
Yes, you want to format a string without printing it! fmt package is your friend when you working with string type, use Sprintf method and… Read More »How to String Formatting in Golang?
I wish converting from one type to another to be much easier in golang 🙂 anyway if you want to convert an int64 into a… Read More »Golang: Convert int64 to String