Serve accepts incoming HTTP connections on the listener l, creating a new service goroutine for each. The service goroutines read requests and then call handler to reply to them. Handler is typically nil, in which case the DefaultServeMux is used.
In addition to the stl Serve behaviour each connection is added to a sync.Waitgroup so that all outstanding connections can be served before shutting down the server.
srv.BeforeBegin(srv.Addr) return srv.Serve() }
log.Println(syscall.Getpid(), srv.Addr) return srv.Serve() }