Esempio n. 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))
}
Esempio n. 2
0
func listLanguages() {
	list := helloworld.Langauges()
	fmt.Printf("Valid lanugages are: \n %v\n", list)
}