14 lines
210 B
Go
Executable File
14 lines
210 B
Go
Executable File
package server
|
|
|
|
import (
|
|
"net/http"
|
|
)
|
|
|
|
func (s *Server) Run() error {
|
|
return http.ListenAndServe(s.Port, s)
|
|
}
|
|
|
|
func (s *Server) ServeHTTP(w http.ResponseWriter, r *http.Request) {
|
|
s.router.ServeHTTP(w, r)
|
|
}
|