Skip to content

Commit

Permalink
fix docked bug in server init
Browse files Browse the repository at this point in the history
  • Loading branch information
forrestjgq committed Dec 2, 2020
1 parent ef00569 commit a20ed88
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion internal/httpsrv/http_server.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,13 @@ type httpServer struct {

var server *httpServer

func init() {
server = &httpServer{}
}

func Start(port int) {
var err error
server = &httpServer{port: port}
server.port = port
server.template, err = template.New("bvar").Parse(htmlContent)
if err != nil {
panic(err)
Expand Down

0 comments on commit a20ed88

Please sign in to comment.