Bir Go sunucusunu yazmayla ilgili kılavuzu izliyorum here.Git sunucusunun ServeHTTP yöntemini bildirme
func (*myHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
// ^^^^^ What does this do?
Bir dönüş türü gibi görünmüyor:
Ben şu bloğu anlamıyorum. Go'da benim anlayışım, dönüş türlerinin bir fonksiyonun parametrelerini takip etmesidir.
func hello(s String) int {}
Yani ServeHTTP bildiriminde (*myHandler)
ne yapar: Bir tamsayı döndüren bu işlev gibi mi? Aşağıdaki metodun
func (*myHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
myHandler
olarak
ServeHTTP, * myHandler türünde bir yöntemdir. Bkz. Https://tour.golang.org/methods/1 –