Skip to content

Commit

Permalink
Fix syntax error
Browse files Browse the repository at this point in the history
  • Loading branch information
Will Alexander committed Aug 24, 2015
1 parent 35544e4 commit c11c225
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions doduc-server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@ func Handler(w http.ResponseWriter, r *http.Request) {

func main() {
fport := flag.Uint("port", 18768, "the port to listen on")
flagParse()
flag.Parse()
logFile, err := os.OpenFile("doduc-server.log", os.O_WRONLY|os.O_APPEND|os.O_CREATE, 0200)
if err != nil {
log.Fatal("unable to open log file")
}
log.SetOutput(logFile)
http.HandleFunc("/", handler)
http.HandleFunc("/", Handler)
log.Fatal(http.ListenAndServe(fmt.Sprintf(":%d", *fport), nil))
}

0 comments on commit c11c225

Please sign in to comment.