[Go]Remove duplicate elements in array/slice

In python to remove duplicates we use unordered iterable set() but in Go it is not so straight forward, there is no package to do this i think... So here's an example on how duplicate elements are removed. Algorithm A flag variable is created using make(), flag is a map that has a key that … Continue reading [Go]Remove duplicate elements in array/slice

[Go]Replace characters in string.

The string is a physical address, then this is split into an array, which then captures the last element of the array. This last element is the actual mac address, then replace all "-" with ":" with the strings package. For converting cisco mac address format, first remove all "-" then slice the strings up, … Continue reading [Go]Replace characters in string.

[Go]Assignment 3: Open a text file and display the content

So here is the assignment 3 for this course Go: The Complete Developer's Guide (Golang) by Stephen Grider, this assignment is a self research assignment which is why Stephen branded assignment3 as hard mode, this is an assignment to train students on how to read the Go documentation. It is not overly hard but it … Continue reading [Go]Assignment 3: Open a text file and display the content