Skip to content

Instantly share code, notes, and snippets.

@parzibyte
Created May 30, 2019 21:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save parzibyte/84629bc79014680776732942938bd10c to your computer and use it in GitHub Desktop.
Save parzibyte/84629bc79014680776732942938bd10c to your computer and use it in GitHub Desktop.
enrutador.HandleFunc("/ventas/{tipo}/{anio}", func(respuesta http.ResponseWriter, peticion *http.Request) {
variablesDePeticion := mux.Vars(peticion)
tipo := variablesDePeticion["tipo"]
anio := variablesDePeticion["anio"]
respuesta.Write([]byte("El tipo de venta es " + tipo + " y el año es " + anio))
}).Methods("GET")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment