Golang: Format Thousand Separator for Currency
There is a super easy trick to format a number with thousand separator in any language.
There is a super easy trick to format a number with thousand separator in any language.
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)
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?
If you have newlines in a string you will face an error! The simple solution is using backtick (`) around your string: Another way to… Read More »Golang How to Write Multiline String
You need a simple way to format the output of your marshaled JSON output! Yes, Golang made it easy for us by using MarshalIndent function… Read More »How to Pretty Print JSON in Golang (Marshal Indent)