Permalink
Browse files

Update README.rdoc

  • Loading branch information...
1 parent 1d88d4f commit 4d499a878a617e389dfc0664319eaa62f4845cdd @tobi committed Jan 19, 2012
Showing with 4 additions and 5 deletions.
  1. +4 −5 README.rdoc
View
@@ -31,12 +31,11 @@ You must be working on a http sever. The http server needs to understand the -pX
= Template:
If you are starting a go web project, use this as template:
-
+
package main
import (
- "http"
- "log"
+ "net/http"
"flag"
"fmt"
)
@@ -52,9 +51,9 @@ If you are starting a go web project, use this as template:
flag.Parse()
http.HandleFunc("/", HelloServer)
- fmt.Printf("Listening on port %d", port)
+ fmt.Printf("Listening on port %d\n", *port)
err := http.ListenAndServe(fmt.Sprintf(":%d", *port), nil)
if err != nil {
- log.Fatal("ListenAndServe: ", err.String())
+ panic(err)
}
}

0 comments on commit 4d499a8

Please sign in to comment.