Skip to content

Instantly share code, notes, and snippets.

@parzibyte
Created May 30, 2019
Embed
What would you like to do?
enrutador.HandleFunc("/libros/{orden:(?:ascendente|descendente)}", func(respuesta http.ResponseWriter, peticion *http.Request) {
variablesDePeticion := mux.Vars(peticion)
orden := variablesDePeticion["orden"]
respuesta.Write([]byte("Libros ordenados: " + orden))
}).Methods("GET")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment