package main
import (
"fmt"
"net/http"
)
func main() {
err := http.ListenAndServe(":8090", nil)
fmt.Println("Error creating http server: ", err)
}
$ go run main.go
Error creating http server: listen tcp :8090: bind: address already in use
err := http.ListenAndServe(":8090", nil)
if err != nil {
log.Println(`Error start server: ` + err.Error())
}
log.Println(`Server was started`)