golang.pngGolang : flag provided but not defined error

Problem :

Your program uses flag.Parse() function to parse the command line arguments and everything is working fine until you….... read more



golang.pngGolang : Quadratic example

Here is a simple tutorial on how to perform quadratic calculation with Golang. This program accepts two floating point values….... read more



golang.pngGolang : micron to centimeter example

Problem:

You need to convert centimeter to micron (ยต) in Golang. How to do that?

Solution:

Simple. See the following….... read more



golang.pngGolang : Flip coin example

This is a simple program to simulate flip coin that I use to train a small artificial intelligence program. Basically….... read more



golang.pngGolang : Stop goroutine without channel

Writing this down here as my own reference. In case you need to stop a goroutine from further execution and….... read more



golang.pngGolang : Convert seconds to minutes and remainder seconds

Problem:

You have an input seconds in integer that you want to convert into minutes and remainder seconds. How to….... read more



golang.pngGolang : How to convert a number to words

I need to translate a given number into words such as 100 to one hundred. The code below is a….... read more



golang.pngGolang : Pad file extension automagically

Problem:

You want to pad file type extension to a given filename string without prompting your program users to do….... read more



golang.pngGolang : Serving HTTP and Websocket from different ports in a program example

Problem:

For some reason you want to split the port use by your program to serve HTTP and Web-socket traffic.….... read more



golang.pngGolang : Calculate BMI and risk category

I'm building a healthcare IoT device that will ask a person about their weight and report back the risk category.….... read more



golang.pngGolang : Calculate diameter, circumference, area, sphere surface and volume

Let's travel back to high school for a while and learn some physics. We will learn how to calculate a….... read more



golang.pngGolang : Find change in a combination of coins example

If you are planning to build a vending machine, self-service cashier machine or any machines that deal with money. Chances….... read more



Advertisement

Advertisement

Advertisement