Skip to content

Instantly share code, notes, and snippets.

View DiegoSantosWS's full-sized avatar
🏠
Working from home

DIEGO DOS SANTOS DiegoSantosWS

🏠
Working from home
View GitHub Profile
<div class="container">
<div class="row">
<h4 class="text-primary">{{.Title2}}</h4>
</div>
<form action="" method="post">
<div class="form-group">
<label for="">Name</label>
<input type="text" name="" class="form-control" placeholder="Enter with your name">
<small id="helpId" class="text-muted">Enter with your name</small>
</div>
package models
import (
"log"
"net/http"
ctr "github.com/DiegoSantosWS/gotoweb/example_html/renderHtml"
)
//IndexPage carrega template de index
@DiegoSantosWS
DiegoSantosWS / index.html
Last active September 17, 2018 18:36
index html
<head>
<title>{{.Title}}}</title>
</head>
<div class="container">
<div class="row">
<p>{{.Agre}}</p><!--Exibe texto qualquer -->
</div>
</div>
@DiegoSantosWS
DiegoSantosWS / indexPage.go
Created September 17, 2018 17:47
Carregando a index
package models
import (
"log"
"net/http"
ctr "github.com/DiegoSantosWS/gotoweb/example_html/renderHtml"
)
//IndexPage carrega template de index
@DiegoSantosWS
DiegoSantosWS / main.go
Created September 17, 2018 17:44
router html
package main
import (
"net/http"
m "github.com/DiegoSantosWS/gotoweb/example_html/models"
)
func main() {
//rota index
@DiegoSantosWS
DiegoSantosWS / render.go
Created September 17, 2018 17:30
EMBEND...
package renderHtml
import "html/template"
var (
ModelosIndex = template.Must(template.ParseFiles("view/index.html"))
ModelosContato = template.Must(template.ParseFiles("view/contato.html"))
)