aboutsummaryrefslogtreecommitdiffstats
path: root/template.go
diff options
context:
space:
mode:
authorJames Mills <prologic@shortcircuit.net.au>2016-09-22 12:51:46 +1000
committerJames Mills <prologic@shortcircuit.net.au>2016-09-22 12:51:46 +1000
commit669492455bba0426fdb30dec650c94a8744b926b (patch)
tree6ce1d071eb1bc1f5b395528ef47176c395aae3bf /template.go
parentInitial Commit (diff)
downloadgopherproxy-669492455bba0426fdb30dec650c94a8744b926b.tar.gz
gopherproxy-669492455bba0426fdb30dec650c94a8744b926b.tar.bz2
gopherproxy-669492455bba0426fdb30dec650c94a8744b926b.zip
Added templating support
Diffstat (limited to 'template.go')
-rw-r--r--template.go14
1 files changed, 14 insertions, 0 deletions
diff --git a/template.go b/template.go
new file mode 100644
index 0000000..7c13451
--- /dev/null
+++ b/template.go
@@ -0,0 +1,14 @@
1package main
2
3var tpltext = `<!doctype html>
4<html>
5<head>
6<meta charset="utf-8">
7<title>{{.Title}}</title>
8</head>
9<body>
10<pre>
11{{range .Lines}} {{if .Link}}({{.Type}}) <a href="{{.Link}}">{{.Text}}</a>{{else}} {{.Text}}{{end}}
12{{end}}</pre>
13</body>
14</html>`