Tutorials

golang.pngGolang : Simple file scaning and remove virus example

18th October 2016

Just for fun, for this tutorial, we will simulate a simple anti-virus program. Let's create a simple file scanner that….... read more



golang.pngGolang : Randomly pick an item from a slice/array example

18th October 2016

Problem:

You are building a game and you want to randomly pick an item from a slice of URLs. How….... read more



golang.pngGolang : Get SPF and DMARC from email headers to fight spam

17th October 2016

Problem:

You are building an email server with spam filter from scratch with Golang and you want to query a….... read more



golang.pngGolang : How to determine a prime number?

17th October 2016

In mathematics and computer security, it is very important to determine if a given number is a prime number or….... read more



golang.pngGolang : Delay or limit HTTP requests example

16th October 2016

Problem:

For some technical limitation reason, you want to delay or slow down HTTP requests to one of your machines….... read more



golang.pngGolang: Prevent over writing file with md5 hash

15th October 2016

This is an additional note for previous tutorial on how to upload/submit file from command line to a….... read more



golang.pngGolang : Command line file upload program to server example

13th October 2016

Writing this tutorial for a friend who is using Golang to develop her IoT application. She needs a client program….... read more



golang.pngGolang : How to filter a map's elements for faster lookup

10th October 2016

A short tutorial on how to filter map elements. Map is a hash table equivalent in Golang and very useful….... read more



golang.pngGolang : Identifying Golang HTTP client request

7th October 2016

Problem:

You've read about the Mirai DDoS malware that infects IoT devices and turning them into a massive….... read more



golang.pngGolang : Not able to grep log.Println() output

6th October 2016

Problem:

You have a Golang program that uses log.Println() to capture text output generated by your program and you want….... read more



golang.pngGolang : Accessing content anonymously with Tor

6th October 2016

There are times when we need to access content and do research anonymously. Using Tor(The Onion Router) can be useful….... read more



golang.pngGolang : How to reverse slice or array elements order

3rd October 2016

In this short tutorial, we will learn how to reverse the elements order inside a slice or array. Taking the….... read more



golang.pngGolang : Reverse IP address for reverse DNS lookup example

24th September 2016

Problem:

You need to reverse a given IPv4 address into a DNS reverse record form to perform reverse….... read more



golang.pngGolang : Skip blank/empty lines in CSV file and trim whitespaces example

22nd September 2016

Problem:

Your Golang program is reading from a CSV file and you want to skip blank lines in the CSV….... read more



golang.pngGolang : Save map/struct to JSON or XML file

20th September 2016

Previous tutorial on converting map/slice/array to JSON or XML format is for output to web via net/http package.….... read more



golang.pngGolang : Clean formatting/indenting or pretty print JSON result

20th September 2016

Problem:

Your Golang program is producing JSON result in a single line that looks like this :

["apple","orange","durian","pear"]
.... read more



golang.pngGolang : How to convert strange string to JSON with json.MarshalIndent

20th September 2016

Problem:

Your database is spewing out a funny looking string that looks like this {"width";800;"height";450} and you want to map….... read more



golang.pngGolang : How to convert JSON string to map and slice

19th September 2016

Couple of simple examples on how to convert JSON string to map and slice(array).

Simple and straightforward way of converting….... read more



Advertisement