From 4d5afdc2a6dfbb985fe9030cad7b0b8c3fc74819 Mon Sep 17 00:00:00 2001 From: KatolaZ Date: Thu, 11 Jan 2018 12:36:56 +0000 Subject: split template in a separate file --- d1pkgweb.go | 102 +----------------------------------------------------------- 1 file changed, 1 insertion(+), 101 deletions(-) (limited to 'd1pkgweb.go') diff --git a/d1pkgweb.go b/d1pkgweb.go index 6aba272..89fa764 100644 --- a/d1pkgweb.go +++ b/d1pkgweb.go @@ -8,106 +8,6 @@ import ( "strings" ) -var templ = ` - -{{.Name}}-{{.Version}} - -
{{.Name}} {{.Version}} [{{.Section}} - {{.Priority}}]
-
[{{.Suite}} - {{.Component}}]
-
-{{.Description}} -
-
-{{.LongDescription}} -
- -
- -
-{{range .Provides}}
Provides: {{.}}
{{end}} -
- -
-Depends: - -
- -
-Recommends: - -
- - -
-Maintainer: {{.Maintainer}} -
- - -` - func main() { args := os.Args @@ -135,7 +35,7 @@ func main() { if r != nil { for s, err := deb822.ScanStanza(r); s["Package"] != ""; s, err = deb822.ScanStanza(r) { if err == nil { - deb822.Stanza2HtmlPage(s, templ, ".", suite, component) + deb822.Stanza2HtmlPage(s, pkgTempl, ".", suite, component) } else { fmt.Printf("error: %s\n", err) } -- cgit v1.2.3