Golang - Custom Error Type And Password ValidationThe objective is to perform validation on the password input to make sure the password is strong. In the process learn about how to define a custom error type and use that. We will be checking the following things in the password. Minimum of one sma...Apr 5, 2022 路 4 min readblog.harishdurga.com
Golang - How Slices Work?sliceOne := []int{1,2,3} sliceTwo := []int{1,2,3} fmt.Println(sliceOne==sliceTwo) If your answer is that the program is going to print true, then this article is for you 馃槈. In fact, the above won't get compiled and the compiler will throw a...Feb 25, 2022 路 2 min readblog.harishdurga.com
Go - Import Side Effect Or Blank ImportBefore we jump into discussing the side effects馃槄, just see the below code and guess the output. package main func init(){ fmt.Println("This is init function") } func main(){ fmt.Println("This is main function. And I am the entry point into a...Nov 9, 2021 路 2 min readblog.harishdurga.com
Sharing Resources In Your Go CodeTo develop a web application using Go we most probably use one of the microframeworks like Gin, Echo, Fiber, and more. These microframeworks give us the essential components like Server, routing, middleware, Templates, and more for building our app...1SSep 17, 2021 路 4 min readblog.harishdurga.com
The Three Dots In Golang...I was trying to implement a method where I remove a certain value from a slice. Then I came across this ... syntax. I didn't come across this three-dot syntax before. So I read about it and then found out that this syntax is used for multiple use cas...1LAug 14, 2021 路 2 min readblog.harishdurga.com