server/server.go
func New(addr string, store Store) *http.Server {
	if store == nil {
		store = NewMemoryStore()
	}
	h := &Handler{store: store}
	return &http.Server{
		Addr:    addr,
		Handler: h,
	}
}
func New(addr string, store Store) *http.Server {
	if store == nil {
		store = NewMemoryStore()
	}
	h := &Handler{store: store}
	return &http.Server{
		Addr:    addr,
		Handler: h,
	}
}
func New ( addr string , store Store ) * http . Server { if store == nil { store = NewMemoryStore ( ) } h := & Handler { store : store } return & http . Server { Addr : addr , Handler : h , } }
// the actual work is done on the handler.go
// here we just provide a helper for the main package to create
// an http.Server and serve a cache remote service, without any user touches
// New returns a http.Server which hosts
// the server-side handler for the remote cache service.
//
// it doesn't listens to the server
the actual work is done on the handler . go here we just provide a helper for the main package to create an http . Server and serve a cache remote service without any user touches New returns a http . Server which hosts the server - side handler for the remote cache service . it doesn t listens to the server