Tutorials
Golang : Create and shuffle deck of cards example
Problem:
You want to create a computer game like Strip Poker or you simply want to create a….... read more
Golang : Variadic function arguments sanity check example
Problem:
Golang is cool and you love to use variadic function frequently. You have a variadic function such as a….... read more
Golang : Simple histogram example
This is a simple histogram program written in Golang. Can be useful in situations where you want to roughly assess….... read more
Golang : Get ASCII code from a key press(cross-platform) example
Problem:
Somehow you are feeling nostalgic and played some retro games from the 80s such as Load Runner….... read more
Golang : Extract unicode string from another unicode string example
Problem:
You have a string with unicode (UTF-8) characters and you want to extract part of the string by using….... read more
Golang : Test input string for unicode example
Problem:
You are trying to create a slightly different solution for user that use unicode and you want to test….... read more
Golang : Handle Palindrome string with case sensitivity and unicode
Problem:
You are studying Computer Science and you have an assignment to check if a word, phrase, number or any….... read more
How to tell if a binary(executable) file or web application is built with Golang?
Problem:
How to tell if a binary(executable) file or web application is built with Golang?
Solutions:
Back in the DOS….... read more
Golang : Compound interest over time example
It is time for me to do something "lighter" now.... such as investing rather than heavy duty programming ..... so….... read more
Fix "Failed to start php5-fpm.service: Unit php5-fpm.service is masked."
Problem:
Encounter this error message :
Failed to start php5-fpm.service: Unit php5-fpm.service is masked.
after upgrading Ubuntu with do-release-upgrade
….... read more
Golang : Proper way to test CIDR membership of an IP 4 or 6 address example
Problem:
You have generated a range of IP addresses from a given Classless Inter-Domain Routing address(CIDR) address and you want….... read more
Golang : Recombine chunked files example
Problem :
You use the previous tutorial on how to split or chunk a big file into smaller….... read more
Golang : Function wrapper that takes arguments and return result example
Continuing from our previous "primitive" tutorial on implementing a simple metaprogramming by creating a wrapper for a function.….... read more
Golang : Perform sanity checks on filename example
Problem:
Your Golang application accepts files uploaded by visitors. However, you want to sanitize the uploaded filenames for security purpose.….... read more
Golang : Get digits from integer before and after given position example
This is more like just for fun tutorial, but can useful in a situation such as extracting suffix or prefix….... read more
Golang : Metaprogramming example of wrapping a function
One of the most important mantras
in programming is "DRY" or "Don't Repeat Yourself". Software developers should try to master….... read more
Golang : Individual and total number of words counter example
Problem:
You need to count the unique instances of words and the total number of words in a given string.….... read more
Golang : Byte format example
Problem:
You want to format the long integer or number string representing a byte size such as giga, mega, peta….... read more