Goroutines are no threads. Starting 30 goroutines absolutely does not mean starting 30 threads. You could schedule hundreds of thousands of goroutines; You cannot do that with threads.
Oh, so I did not understand how the gorutines work.
Can you explain to me how it works? (I read the documentation, but I still do not understand it). So goroutine automatically creates all the threads it needs? So I do not have to add any code and this is enough:
go http.HandleFunc("/", HomePage)
go http.HandleFunc("/king", KingPage)
Goroutines are lightweight “threads” that are handled by the Go runtime and aren’t directly translated to OS threads.
Apart from that, the standard library http package already serves each request on a different goroutine for you, you don’t need to do it. So something like this is enough: