Tutorials

golang.pngGolang : Delete item from slice based on index/key position

30th June 2015

Problem :

You want to delete an element from a slice or array and you know the index(position number) of….... read more



golang.pngGolang : When to use make or new?

30th June 2015

Problem :

When to use make or new in Golang ? It can be confusing for newbie to Golang.

Solution….... read more



golang.pngGolang : Channels and buffered channels examples

30th June 2015

Continue from previous tutorial on goroutines. Goroutines run in the same memory address space and how does Golang….... read more



golang.pngGolang : How to protect your source code from client, hosting company or hacker?

29th June 2015

My friend is bidding for a project and was asked by his client to let them host his program on….... read more



golang.pngGolang : How to check if slice or array is empty?

29th June 2015

Problem :

One of your code is throwing out panic error and apparently it is trying to do a for….... read more



golang.pngGolang : Check if a string contains multiple sub-strings in []string?

25th June 2015

Problem :

You have a string and you use strings.Contains() function to determine if there is a sub-string inside the….... read more



golang.pngGolang : Accept input from user with fmt.Scanf skipped white spaces and how to fix it

25th June 2015

Problem :

Your program accepts user input from console(terminal). It was working fine if the user input is in one….... read more



golang.pngGolang : Removes punctuation or defined delimiter from the user's input

25th June 2015

Problem :

You need to clean up your user's input from punctuation or certain delimiter defined by you. For example,….... read more



golang.pngGolang : What is StructTag and how to get StructTag's value?

24th June 2015

For those who code or read Golang's code and left wondering what are those string inside the '``' such as….... read more



golang.pngGolang : How to tokenize source code with text/scanner package?

24th June 2015

It has been a while since I touch the topic on tokenizer.....err... since the day I actually built a compiler….... read more



golang.pngGolang : Get user input until a command or receive a word to stop

24th June 2015

Just a code fragment below as supplement to tutorial on how to read until certain character to break….... read more



golang.pngGolang : How to get a user home directory path?

23rd June 2015

Problem :

You need to get a user's home directory path in a Unix/Linux machine for storing or processing customized….... read more



golang.pngGolang : How to display image file or expose CSS, JS files from localhost?

23rd June 2015

Problem :

You execute your Golang program on localhost and want to see images on localhost:8080, but your <img> HTML….... read more



golang.pngGolang : Intercept Ctrl-C interrupt or kill signal and determine the signal type

22nd June 2015

Problem :

Your server needs to perform some clean up operation or flush everything in memory to disk before shutting….... read more



golang.pngGolang : How to pipe input data to executing child process?

22nd June 2015

Problem :

Your program is executing a child process via os/exec and you want to pipe input data to the….... read more



macosx.jpgUnix/Linux : How to pipe/save output of a command to file?

22nd June 2015

Problem :

You need to capture/pipe or save the output of a command execution in Unix/Linux to a file. How….... read more



golang.pngGolang : JQuery AJAX post data to server and send data back to client example

17th June 2015

Just want to write this tutorial for fun.

In this tutorial, we will learn how to use JQuery's AJAX to….... read more



golang.pngGolang : Decode/unmarshal unknown JSON data type with map[string]interface

16th June 2015

This tutorial is courtesy of Rohan Allison on how to decode or unmarshal JSON into map[string]interface. There are….... read more



Advertisement