diff options
| author | James Mills <prologic@shortcircuit.net.au> | 2016-09-22 12:51:46 +1000 |
|---|---|---|
| committer | James Mills <prologic@shortcircuit.net.au> | 2016-09-22 12:51:46 +1000 |
| commit | 669492455bba0426fdb30dec650c94a8744b926b (patch) | |
| tree | 6ce1d071eb1bc1f5b395528ef47176c395aae3bf /template.go | |
| parent | Initial Commit (diff) | |
| download | gopherproxy-669492455bba0426fdb30dec650c94a8744b926b.tar.gz gopherproxy-669492455bba0426fdb30dec650c94a8744b926b.tar.bz2 gopherproxy-669492455bba0426fdb30dec650c94a8744b926b.zip | |
Added templating support
Diffstat (limited to 'template.go')
| -rw-r--r-- | template.go | 14 |
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 @@ | |||
| 1 | package main | ||
| 2 | |||
| 3 | var 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>` | ||
