// We create a server and return a pointer to a standard package struct type called Server
// A girl needs a pointer because it holds the memory address of a variable.
// but pointer in Go is not a many faced God like in C (no pointer arithmetic)
We create a server and return a pointer to a standard package struct type called Server
A girl needs a pointer because it holds the memory address of a variable.
but pointer in Go is not a many faced God like in C (no pointer arithmetic)
// We create a server and return a pointer to a standard package struct type called Server // A girl needs a pointer because it holds the memory address of a variable . // but pointer in Go is not a many faced God like in C ( no pointer arithmetic )
func newServer(port string) *server {
	httpServer := &http.Server{Addr: ":" + port, Handler: http.HandlerFunc(handle)}
	return &server{httpServer: httpServer}
}
func newServer ( port string ) * server { httpServer := & http . Server { Addr : " " + port , Handler : http . HandlerFunc ( handle ) } return & server { httpServer : httpServer } }
We create a server and return a pointer to a standard package struct type called Server
A girl needs a pointer because it holds the memory address of a variable.
We create a server and return a pointer to a standard package struct type called Server A girl needs a pointer because it holds the memory address of a variable .
// Initializing a struct is easy. Simply use the name of the field as a key to the // value you want to pass. Also notice how we only did a partial initiliaztion.