Created
October 12, 2017 06:31
-
-
Save oieioi/e83048aaf1db8c25747f2808d21d1ed8 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import "net/http" | |
import "encoding/json" | |
type student struct { | |
Name string | |
Mail string | |
} | |
func main(){ | |
http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request){ | |
data, _ := json.Marshal(student{Name: "oieioi", Mail: "[email protected]"}) | |
w.Write(data) | |
}) | |
http.ListenAndServe(":8083", nil) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment