John Asmuth пре 12 година
родитељ
комит
843dbcba88
1 измењених фајлова са 11 додато и 11 уклоњено
  1. 11 11
      go/hello.go

+ 11 - 11
go/hello.go

@@ -1,24 +1,24 @@
 package main
 package main
 
 
 import (
 import (
-  "net/http";
-  "encoding/json";
-  "runtime";
-  "fmt";
+  "encoding/json"
+	"fmt"
+	"net/http"
+	"runtime"
 )
 )
 
 
 type MessageStruct struct {
 type MessageStruct struct {
-    Message string
+	Message string
 }
 }
 
 
 func hello(w http.ResponseWriter, r *http.Request) {
 func hello(w http.ResponseWriter, r *http.Request) {
-  m := MessageStruct{"Hello, world"}
-  enc := json.NewEncoder(w)
-  enc.Encode(m)
+	m := MessageStruct{"Hello, world"}
+	enc := json.NewEncoder(w)
+	enc.Encode(m)
 }
 }
 
 
 func main() {
 func main() {
-  runtime.GOMAXPROCS(runtime.NumCPU())
-  http.HandleFunc("/json", hello)
-  http.ListenAndServe(":8080", nil)
+	runtime.GOMAXPROCS(runtime.NumCPU())
+	http.HandleFunc("/json", hello)
+	http.ListenAndServe(":8080", nil)
 }
 }