6
Dökümantasyonda http.Server
için tip beyanını okuyordum ve buna rastladım. Eğer srv.ListenAndServe()
ve srv.Addr
boş bir dize ararsanızPort ": http", http.Server'da ne anlama geliyor?
type Server struct {
Addr string // TCP address to listen on, ":http" if empty
// more...
}
ardından ListenAndServe
":http"
net.Listen
için (http/server.go) geçecek.
":http"
ne anlama geliyor?
Not:
http
80.You burada daha fazla isim görebilirsiniz olduğu tanıtıldı [işlemek 876e9d1b] (https://github.com/golang/go/commit/876e9d1b89cf87f3791153fa9472142cd5294223#diff-21335be6bb7e87c8e655a237f635b095R679) tarafından Şubat 2011'de [Brad Fitzpatrick] (https://github.com/bradfitz). – VonC