Tutorials
Golang : GMail API create and send draft with simple upload attachment example
Continuing from our previous example of how to send an email with attachment using Gmail API. We will….... read more
Golang : Send email with attachment(RFC2822) using Gmail API example
This is a simple tutorial on how to send email using Gmail API in Golang since the examples found in….... read more
Golang : Chunk split or divide a string into smaller chunk example
Problem:
You need a function in Golang that are similar to PHP's chunk_split()
function that can split a string into….... read more
Golang: Pad right or print ending(suffix) zero or spaces in fmt.Printf example
From the previous tutorial on how to pad left or print leading zeros with fmt.Printf() function, a reader….... read more
Golang : Simple client-server HMAC authentication without SSL example
Problem:
You are building a distributed system that involves multiple processes communicating across a cluster of computers. You want to….... read more
Golang : Inject/embed Javascript before sending out to browser example
Problem:
You want to grab some Javascript code from other sources such as an external server or you simply want….... read more
Golang : Count leading or ending zeros(any item of interest) example
Problem:
You want to count the number of leading spaces or zeros in a string such as
000-123-456
,….... read more
Golang : reCAPTCHA example
For this tutorial we will explore how to implement reCAPTCHA with Golang. If you are running website with lots of….... read more
Golang : Fix - does not implement sort.Interface (missing Len method)
Problem:
You are trying to use the sort.Sort()
or sort.Reverse()
functions on type []string
data but encounter this error message:
Golang : Take screen shot of browser with JQuery example
In this tutorial, we will learn how to do a screen capture of a client(browser) and send the capture screen….... read more
Golang : minus time with Time.Add() or Time.AddDate() functions to calculate past date
Let's go back into history for this tutorial's sake. Somehow you have invented a time traveling device powered by Golang….... read more
CodeIgniter/PHP : Remove empty lines above RSS or ATOM xml tag
Problem:
Your friend is complaining that your website RSS feed is busted and validating with https://validator.w3.org gives this….... read more
Detect if Google Analytics and Developer Media are loaded properly or not
This is for my own future reference. I need a way to check if Digital Media and Google Analytics JavaScript….... read more
Golang : Process non-XML/JSON formatted ASCII text file example
Problem:
You have to process raw data files produced by third-party servers that you have no control over. The files….... read more
Golang : Convert long hexadecimal with strconv.ParseUint example
Just an example on how to convert a long hexadecimal input string into integer. Most hexadecimal can be handled easily….... read more
Golang : Use regular expression to get all upper case or lower case characters example
This is an add-on for the previous tutorial on how to get all upper case or lower case….... read more
Golang : Get all upper case or lower case characters from string example
Problem:
You have a string and you want to get all the uppercase characters in the string. For example, you….... read more
Golang : Break string into a slice of characters example
Problem:
You want to convert a string into a slice/array of individual characters. It is similar to breaking….... read more