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