From: Waldemar Kozaczuk <jwkozac...@gmail.com>
Committer: Waldemar Kozaczuk <jwkozac...@gmail.com>
Branch: master

apps: change golang httpserver example to display port they listen on

Signed-off-by: Waldemar Kozaczuk <jwkozac...@gmail.com>

---
diff --git a/golang-httpserver/httpserver.go b/golang-httpserver/httpserver.go
--- a/golang-httpserver/httpserver.go
+++ b/golang-httpserver/httpserver.go
@@ -21,7 +21,7 @@ func main() {
 
 //export GoMain
 func GoMain() {
-       fmt.Println("Go version:", runtime.Version());
+       fmt.Printf("Go version: %s, listening on port 8000 ...\n", 
runtime.Version());
        http.HandleFunc("/", hello)
        http.ListenAndServe(":8000", nil)
 }
diff --git a/golang-pie-httpserver/httpserver.go 
b/golang-pie-httpserver/httpserver.go
--- a/golang-pie-httpserver/httpserver.go
+++ b/golang-pie-httpserver/httpserver.go
@@ -16,7 +16,7 @@ func hello(w http.ResponseWriter, r *http.Request) {
 }
 
 func main() {
-       fmt.Println("Go version:", runtime.Version());
+       fmt.Printf("Go version: %s, listening on port 8000 ...\n", 
runtime.Version());
        http.HandleFunc("/", hello)
        http.ListenAndServe(":8000", nil)
 }

-- 
You received this message because you are subscribed to the Google Groups "OSv 
Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to osv-dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/osv-dev/00000000000056506205c31ff850%40google.com.

Reply via email to