Created
September 17, 2018 18:03
-
-
Save DiegoSantosWS/0a623e09ce04b2d7c2eb925c4af353a8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package models | |
import ( | |
"log" | |
"net/http" | |
ctr "github.com/DiegoSantosWS/gotoweb/example_html/renderHtml" | |
) | |
//IndexPage carrega template de index | |
func ContactPage(w http.ResponseWriter, r *http.Request) { | |
data := map[string]interface{}{ | |
"Title": "My frist page using GOLANG", | |
"Title2": "Enter in contact to more informations", | |
} | |
if err := ctr.ModelosContato.ExecuteTemplate(w, "contato.html", data); err != nil { | |
http.Error(w, "[CONTENT ERRO] Erro in the execute template", | |
http.StatusInternalServerError) | |
log.Fatal(err.Error()) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment