Overview In this article, we will study different types of timeouts that are possible in HTTP or TCP or UDP or Unix Sockets Communication, etc when connecting from Client to the Server….
Category: Tech
Iterative Binary Search Tree in Go (Golang)
Introduction A binary search tree abbreviated as BST is a binary tree. For each node in a Binary Search Tree Value of each node in the left subtree is less than the…
Write to a file in Go (Golang)
There are different ways of writing a file in GO. Let’s examine this in detail through different examples which illustrates how to write line by line to a file. Buffered write using…
Check if file is a directory or not in Go (Golang)
See the below code to know if a file is a file or it is a directory If temp is a file output will be = “temp is a file” If temp…
Check if a file or directory exists in Go (Golang)
os.Stat and os.IsNotExist() can be used to check whether a particular file or directory exist or not. File Exists Folder Exists
Double, Single and Back quotes in Go (Golang)
Double quotes It is used to define a string. A string defined within double quotes will honor escaping characters. For, eg for when printing a string having \n there will be a…
Character in Go (Golang)
Overview Golang does not have any data type of ‘char‘. Therefore byte is used to represent the ASCII character. byte is an alias for uint8, hence is of 8 bits or 1…
Default Zero Value of all Types in Go (Golang) With Examples
Default Value Table Type Default Value Integer 0 Float 0 Complex Number 0 Real and 0 Imaginary Part Byte 0 Rune 0 String “” Bool false Array Every array value to its…
Hex and Octal in Golang
Overview Hex numbers are base 16 Octal numbers are base 8 Hex Numbers Hex numbers can be written using prefix 0x or 0X in GO. When Go sees any number starting with…
Trie Implementation in Go (Golang)
Overview A trie is a data structure for efficient information retrieval. It is a special kind of tree where a path starting from root to a particular node can define a word…