It sounds like you have Tomcat running, and it's listening on port 8080.  
If that's the case, then your go program will be unable to bind a listening 
socket on port 8080 at the same time.  Either modify your go program to 
bind to a different port; or stop Tomcat before starting your go program; 
or modify the Tomcat config to bind to a different port, and restart it.

Note that you should have seen an error message from your go program 
telling you the problem.  http.ListenAndServe returns an error - but 
unfortunately you threw that value away, so you see nothing.

Go doesn't have exceptions.  It's up to you to put the error value returned 
by a function in a variable, and do something useful with it. e.g.

err := http.ListenAndServe(":8080",nil)
if err != nil {
    fmt.Println(err)
        }

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/8efd023f-99e3-4e13-9955-ecb4b74b4df4%40googlegroups.com.

Reply via email to