Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
enrutador.HandleFunc("/pedidos/{anio:[0-9]{4}}", func(respuesta http.ResponseWriter, peticion *http.Request) {
variablesDePeticion := mux.Vars(peticion)
anio := variablesDePeticion["anio"]
respuesta.Write([]byte("Pedidos del año: " + anio))
}).Methods("GET")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment