[Go] basics and web
This commit is contained in:
20
slides/go/webgo/template.go
Normal file
20
slides/go/webgo/template.go
Normal file
@@ -0,0 +1,20 @@
|
||||
package main
|
||||
|
||||
var baseTemplate =`
|
||||
<html>
|
||||
<head>
|
||||
<title>Home</title>
|
||||
<style>
|
||||
p {
|
||||
background-color: #f4f4f4;
|
||||
border-radius: 5px;
|
||||
}
|
||||
</syle>
|
||||
</head>
|
||||
<body>
|
||||
{{range .}}
|
||||
<p>{{.Content}} {{.Name}}</p>
|
||||
{{end}}
|
||||
</body>
|
||||
</html>
|
||||
`
|
||||
Reference in New Issue
Block a user