README ¶ Web Server Description Predefined web server Usage srv := New("localhost:45568", func(w http.ResponseWriter, r *http.Request) { w.WriteHeader(http.StatusOK) w.Write([]byte("Hello world")) }) err := srv.Start() if err != nil { t.Error("server error:", err) } Expand ▾ Collapse ▴ Documentation ¶ Index ¶ type Server func New(address string, handler func(w http.ResponseWriter, r *http.Request)) *Server func (s *Server) Start() error Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ This section is empty. Types ¶ type Server ¶ type Server struct { *http.Server } func New ¶ func New(address string, handler func(w http.ResponseWriter, r *http.Request)) *Server func (*Server) Start ¶ func (s *Server) Start() error Source Files ¶ View all Source files Server.go Click to show internal directories. Click to hide internal directories.