Learn Concurrency in Go
Concurrency in Go is one of its most powerful features, designed to make it easy to write concurrent programs.
Read MoreLearn Go as a DevOps Engineer
Go, also known as Golang, is an open-source programming language designed for simplicity, efficiency, and reliability.
Read MoreDeveloping a Custom Kubernetes Controller in Go
A custom Kubernetes controller manages custom resources within a Kubernetes cluster, allowing for extended functionalities and custom automation.
Read MoreCreating a Monitoring Agent in Go
Building a monitoring agent involves collecting metrics from a system and sending them to a monitoring server or displaying them on a dashboard.
Read MoreBuilding a CI/CD Pipeline Tool in Go
Developing a custom CI/CD pipeline tool in Go can help automate the processes of building, testing, and deploying applications.
Read MoreGolang vs Python: The Ultimate Battle in DevOps
In the world of DevOps, two programming languages are often pitted against each other: Golang and Python.
Read MoreHow to Create a Password Generator in Golang
Introduction In today’s digital age, password security is more important than ever before.
Read MoreHow to Convert Time to String in Golang
If you need to convert Time to a String in Go, then you can do one of the following:
Read MoreHow to Perform a Deep Copy in Golang
To perform a Deep Copy in Go, you can use a struct type as follows:
Read MoreHow to Return Lambda Functions in Golang
Go doesn’t typically have Lambda Expressions, but synonymous to Lambdas, or Closures if Anonymous Functions for Go.
Read MoreHow to Create an Empty Slice in Golang
If you would like to create an empty slice in Go, then you can do the following:
Read More[Solved] dial tcp: lookup proxy.golang.org: i/o timeout
If you get a timeout when trying to install go dependencies, the error may look something like this:
Read MoreHow to Execute Linux Commands in Golang
If you want to execute linux commands in Golang, then you can use exec.
Read MoreHow to Check for Prime Numbers using Golang
If you need to check for Prime Numbers in Golang, then you can use the following method:
Read MoreHow to Raise a Number to a Power in Golang
If you need to raise a number to a power in Golang, then you can use the math.
Read MoreHow to Calculate the Sum of the Numbers in the Nth row of a Triangle in Golang
The challenge Given the triangle of consecutive odd numbers: 1 3 5 7 9 11 13 15 17 19 21 23 25 27 29 .
Read MoreHow to SHA256 a String in Golang
If you need to SHA256 a String in Go, then you can use the crypto/sha256 package.
Read MoreHow to Base64 Encode/Decode in Golang
Go ships with an encoding/base64 package that allows for encode and decoding of Base64 strings.
Read MoreHow to perform Array Element Parity in Golang
The challenge You will be given an array of integers whose elements have both a negative and a positive value, except for one integer that is either only negative or only positive.
Read MoreIrreducible Sum of Rationals in Golang
The challenge You will have a list of rationals in the form:
Read MoreCalculating Cartesian Neighbors Distance in Golang
The challenge We have been searching for all the neighboring points in a Cartesian coordinate system.
Read MoreHow to Calculate Dominant Primes in Golang
The challenge The prime number sequence starts with: 2,3,5,7,11,13,17,19.... Notice that 2 is in position one.
Read MoreHow to Solve Simple Square Numbers in Golang
The challenge In this challenge, you will be given a number n (n > 0) and your task will be to return the smallest square number N (N > 0) such that n + N is also a perfect square.
Read MoreHow to perform Function Iteration in Golang
The challenge The purpose of this challenge is to write a higher-order function returning a new function that iterates on a specified function a given number of times.
Read MoreHow to Find the Sum of Prime-Indexed Elements in Go
The challenge You will be given an integer array and your task is to return the sum of elements occupying prime-numbered indices.
Read MoreCalculate the Most Frequent Weekdays in Go
The challenge What is your favourite day of the week? Check if it’s the most frequent day of the week in the year.
Read MoreReturn Index of Matching Closing Bracket in Go
The challenge In this challenge, you will be given a string with brackets and an index of an opening bracket and your task will be to return the index of the matching closing bracket.
Read MoreHow to Sum the Average for NBA Players in Golang
The challenge Write a function, called sumPPG, that takes two NBA player objects/struct/Hash/Dict/Class and sums their PPG
Read MoreHow to Compute a Cube as Sums in Golang
The challenge You will be given a number n (where n >= 1) and your task is to find n consecutive odd numbers whose sum is exactly the cube of n.
Read MoreHow to create a Coordinates Validator in Golang
The challenge You need to create a function that will validate if given parameters are valid geographical coordinates.
Read MoreHow to Validate ISBN-10 numbers in Golang
The challenge ISBN-10 identifiers are ten digits long. The first nine characters are digits 0-9.
Read MoreHow to Replace Noun Phrases with Pronouns in Golang
The challenge A Noun Phrase is a phrase that can be replaced by a pronoun [he/she/it].
Read MoreMaximum Positive Integer Rotations in Golang
The challenge Write function MaxRot(n) which given a positive integer n returns the maximum number you got doing rotations similar to the above example.
Read MoreHow to Find the Sum of Angles in Golang
The challenge Find the total sum of internal angles (in degrees) in an n-sided simple polygon.
Read MoreHow to Stop a Goroutine in Golang
It’s possible to stop a Goroutine by sending a value into it via a signal channel:
Read MoreHighest Rank Number in an Array in Golang
The challenge Complete the method which returns the number which is most frequent in the given input array.
Read MoreHow to Reverse Sort Integers in Go
The challenge The two oldest ages function/method needs to be completed.
Read MoreHow to Reimplement the Unix Uniq Command in Golang
The challenge Implement a function which behaves like the uniq command in UNIX.
Read MoreHow to check if a string is empty in Go
If you need to check if a string is empty in Go, then there are two possible ways to immediately verify this:
Read MoreHow to read a file line by line in Go
If you need to read a file line by line in Go, then you can use the bufio package as follows:
Read MoreFloating-point Approximation in Golang
The challenge Consider the function f: x -> sqrt(1 + x) - 1 at x = 1e-15.
Read MoreAll the Ways to Divide an Array in Two in Golang
The challenge Write a function partlist that gives all the ways to divide an array of at least two elements into two non-empty parts.
Read MoreHow to check if a file exists in Go
If you need to check if a file exists using Go, then you can use one of the following methods, depending on the version of Go you may be using.
Read MoreHow to convert a string value to an int in Go
If you need to convert a string to an int in Go, then you should use the strconv.
Read MoreHow to convert an int value to string in Go
If you need to convert an int to a string in Go, then you should use the strconv.
Read MoreHow to Efficiently Concatenate Strings in Go
If you are using a version of Go >= 1.10, then you should be using the newer strings.
Read MoreHow to check if a map contains a key in Go
If you have a map in Go and want to only perform an action if it contains a certain key, then you can do so easily:
Read MoreHow to Loop Forever in Golang
If you need to loop forever, or infinitely, in your Go code, then you have 2 options:
Read MoreUnderstanding For Loops in Golang
In Golang a for loop is a way to loop through an iterable.
Read More[Solved] go mod init: modules disabled by GO111MODULE=off
You’ve probably just tried to initialise a new Go module, and received the following error:
Read MoreHow to UpperCase the start of each Word in a String in Golang
The challenge The task is to take a string of lower-cased words and convert the sentence to upper-case the first letter/character of each word
Read MoreHow to Find the Smallest Integer in the Array in Golang
The challenge Given an array of integers your solution should find the smallest integer.
Read MoreForming Unique Array Combinations in Golang
The challenge You are given an array of arrays and your task will be to return the number of unique arrays that can be formed by picking exactly one element from each subarray.
Read MoreHow to Sum all the Integers in a String in Golang
The challenge Implement a function that calculates the sum of the integers inside a string.
Read MoreHow to Reverse a String in Golang
The challenge Complete the solution so that it reverses the string passed into it.
Read MoreHow to Find the Last Digit of a Huge Number in Golang
The challenge For a given list [x1, x2, x3, ..., xn] compute the last (decimal) digit of x1 ^ (x2 ^ (x3 ^ (.
Read MoreHow to Circularly Sort an Array in Golang
The challenge An array is circularly sorted if the elements are sorted in ascending order but displaced, or rotated, by any number of steps.
Read MoreHow to Alternate String Casing in Golang
The challenge Write a function toWeirdCase (weirdcase in Ruby) that accepts a string, and returns the same string with all even indexed characters in each word uppercased, and all odd indexed characters in each word lowercased.
Read MoreRoman Numerals Decoder in Golang
The challenge Create a function that takes a Roman numeral as its argument and returns its value as a numeric decimal integer.
Read MoreHow to Subtract from Time in Golang
The challenge Clock shows h hours, m minutes and s seconds after midnight.
Read MoreBit Counting in Golang
The challenge Write a function that takes an integer as input, and returns the number of bits that are equal to one in the binary representation of that number.
Read MoreHow to Find Next Higher Number with Same Bits in Golang
The challenge Find the next higher number (int) with same ‘1’- Bits.
Read MoreHow to Find the First Non-Repeating Character in Golang
The challenge Write a function named first_non_repeating_letter that takes a string input, and returns the first character that is not repeated anywhere in the string.
Read MoreHow to Find the Last Fibonacci Digit in Golang
The challenge Return the last digit of the nth element in the Fibonacci sequence (starting with 1,1, to be extra clear, not with 0,1 or other numbers).
Read MoreHow to Validate an IP Address in Golang
The challenge Write an algorithm that will identify valid IPv4 addresses in dot-decimal format.
Read MoreFormatting Strings with Fmt in Golang
Fmt provides printing to standard output (usually the console) and formatting of strings capabilities.
Read MoreHow to Read from Standard Input in Golang
Reading from “standard input” is really useful if you are making a command-line application and require user input.
Read MoreHow to Install Golang on WSL/WSL2
If you need to install Golang on WSL under Windows 10 or higher, you can follow these few steps.
Read MoreHow to Repeat by String Index in Golang
The challenge Create a function that repeats each character by the amount of it’s index value of the original string.
Read MoreCalculate the Third Angle of a Triangle in Go
The challenge You are given two interior angles (in degrees) of a triangle.
Read MoreHow to Detect if Numbers are in Order in Golang
The challenge In this challenge, your function receives an array of integers as input.
Read MoreAlternate Capitalization in Golang
The challenge Given a string, capitalize the letters that occupy even indexes and odd indexes separately, and return as shown below.
Read MoreCheck if a String is Uppercase in Golang
The challenge Create a method IsUpperCase to see whether the string is ALL CAPS.
Read MoreHow to UpperCase a String in Golang
In Go, there are multiple ways to make a string UpperCase, each of them are by using the strings package.
Read MoreReturn the Shortest Words in Golang
The challenge Given a string of words, return the length of the shortest word(s).
Read MoreCreating a Multiplication Table for a Number in Golang
The challenge Your goal is to return multiplication table for number that is always an integer from 1 to 10.
Read MoreHow to Remove Duplicates in an Array in Golang
The challenge Remove the left-most duplicates from a list of integers and return the result.
Read MoreHow to Reverse or Rotate in Golang
The challenge The input is a string str of digits. Cut the string into chunks (a chunk here is a substring of the initial string) of size sz (ignore the last chunk if its size is less than sz).
Read MoreGet which Quarter of the Year in Golang
The challenge Given a month as an integer from 1 to 12, return to which quarter of the year it belongs as an integer number.
Read MoreIntroducing Variables in Golang
Golang comes with a decent offering around variables that you can use to store, retrieve and manipulate information.
Read MoreGolang cannot convert (type string) to type int
Every language has it’s ways of converting data types. One of the most common data types to convert between is that of strings (string) and integers (int).
Read More