예제 #1
0
func HandleList(w http.ResponseWriter, r *http.Request) {
	list := helloworld.Langauges()

	json, err := json.Marshal(list)
	if err != nil {
		handleError(w, err)
		return
	}

	sendJSON(w, string(json))
}
예제 #2
0
func listLanguages() {
	list := helloworld.Langauges()
	fmt.Printf("Valid lanugages are: \n %v\n", list)
}