AZAreesh Zafarinareeshzafar.hashnode.dev00sql.Open() doesn't open anythingApr 11 · 3 min read · We all know the basic drill of connecting a db in Go: func main(){ //... dsn := flag.String("dsn", "web:password@/demoProject", "MySQL data source name") flag.Parse() db, err := openDB(*dsn) if err Join discussion
AZAreesh Zafarinareeshzafar.hashnode.dev00(Golang)You've Been Calling It a Handler Wrong All AlongApr 8 · 2 min read · When routing in go, we attach a normal function to a router and call it a handler, for example : package main func home(w http.ResponseWriter, r *http.Request) { w.Write([]byte("Hello from SnippeJoin discussion
AZAreesh Zafarinareeshzafar.hashnode.dev00How Go's Server Multiplexer Actually Works Apr 7 · 3 min read · What is ServeMux in Go? ServeMux is a request router that decides which function should handle an incoming request, it matches the URL of an incoming http request to a set of registered patterns whichJoin discussion