Overview Convert singly linked list into a circular linked list using Golang Input singly linked list: Output list that should be a circular linked list: Program There are two important methods in…
Category: Tech
Convert singly linked list into an array using Go (Golang)
Overview Convert singly linked list into an array using Golang Input singly linked list: Output array: Program Output:
Understanding Fprint function in Go (Golang)
Overview Fprint is defined in the fmt package and is used to format a string using the default format specifier and write it to io.Writer instance passed to it. https://golang.org/pkg/fmt/#Fprint Below is…
Understanding Fprintf function in Go (Golang)
Overview Fprintf is defined in the fmt package and is used to format a string and write that formatted string to io.Writer instance passed to it as one of the arguments. https://golang.org/pkg/fmt/#Fprint…
Understanding Errorf function in Go (Golang)
Overview Errorf function is defined in the fmt package and is used to create a custom error with a formatted message as per the format specifier provided. https://golang.org/pkg/fmt/#Errorf Its main use is…
Set cookie http in Go (Golang)
Overview A cookie in golang is represented as below in golang https://golang.org/src/net/http/cookie.go See https://tools.ietf.org/html/rfc6265 for details of each of the fields of the above cookie. When it comes to the setting of…
Read cookie http in Go (Golang)
Overview net/http Request struct provides a convenient method to read a particular cookie given its name. Below is the signature of that method. https://golang.org/pkg/net/http/#Request.Cookie To print all cookies, we can iterate over the…
Cookies in Go (Golang)
What is cookie Cookies are a way to store information at the client end. The client can be a browser, a mobile application, or anything which makes an HTTP request. Cookies are…
CookieJar in Go (Golang)
Overview HTTP client in golang lets you specify a CookieJar that manages storing and sending of the cookies while making external HTTP requests. As the name suggests, think of it as a…
Println vs Print vs Printf in Go (Golang)
Overview Println, Print, and Printf are defined in the fmt package and are used to format a string and write to standard output https://golang.org/pkg/fmt/ The basic difference between them is Println formats…