gin
This commit is contained in:
29
gin/2-template/templates/index.tmpl
Normal file
29
gin/2-template/templates/index.tmpl
Normal file
@@ -0,0 +1,29 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Title</title>
|
||||
<link rel="stylesheet" href="/assets/main.css">
|
||||
</head>
|
||||
<body>
|
||||
<h4>变量</h4>
|
||||
<h1>user: {{ .user }}</h1>
|
||||
<h4>对象</h4>
|
||||
{{ .msg.Name }}
|
||||
<h4>数组</h4>
|
||||
{{ .arr_2 }}
|
||||
<ul>
|
||||
{{ range $key,$val := .arr_2 }}
|
||||
<li>{{ $key }} - {{ . }}</li>
|
||||
{{ end }}
|
||||
<hr>
|
||||
{{ range .arr_2 }}
|
||||
<li>{{ . }}</li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
|
||||
|
||||
<h1><a href="/json" target="_blank">JSON</a></h1>
|
||||
<h1><a href="/yaml" target="_blank">yaml</a></h1>
|
||||
</body>
|
||||
</html>
|
Reference in New Issue
Block a user