Browse Source

example: print the address of server.

Dmitry Chestnykh 14 years ago
parent
commit
d6b0f36e6e
1 changed files with 3 additions and 1 deletions
  1. 3 1
      example/main.go

+ 3 - 1
example/main.go

@@ -2,6 +2,7 @@
 package main
 package main
 
 
 import (
 import (
+	"fmt"
 	"github.com/dchest/captcha"
 	"github.com/dchest/captcha"
 	"http"
 	"http"
 	"io"
 	"io"
@@ -41,7 +42,8 @@ func main() {
 	http.HandleFunc("/", showFormHandler)
 	http.HandleFunc("/", showFormHandler)
 	http.HandleFunc("/process", processFormHandler)
 	http.HandleFunc("/process", processFormHandler)
 	http.Handle("/captcha/", captcha.Server(captcha.StdWidth, captcha.StdHeight))
 	http.Handle("/captcha/", captcha.Server(captcha.StdWidth, captcha.StdHeight))
-	if err := http.ListenAndServe(":8080", nil); err != nil {
+	fmt.Println("Server is at localhost:8666")
+	if err := http.ListenAndServe(":8666", nil); err != nil {
 		log.Fatal(err)
 		log.Fatal(err)
 	}
 	}
 }
 }