How Go's Server Multiplexer Actually Works
go
dev.to
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 which we define like so: mux:= http.NewServeMux() mux.HandleFunc("/", home) mux.HandleFunc("/add",addNum) when a user hits / url then the home function is run, similarly when a user hits the "/add" url the addNum function will be run. Simple right? But there's a catch, go's servemu