go formatting

This commit is contained in:
Mark McGranaghan 2012-10-01 10:22:49 -07:00
parent deed40f168
commit 8774894291

View File

@ -102,31 +102,26 @@ func main() {
seg.codeRendered = pipe(pygmentizePath, []string{"-l", "go", "-f", "html"}, seg.code+" ") seg.codeRendered = pipe(pygmentizePath, []string{"-l", "go", "-f", "html"}, seg.code+" ")
} }
fmt.Printf(` fmt.Printf(`<!DOCTYPE html>
<!DOCTYPE html> <html>
<html> <head>
<head> <meta http-eqiv="content-type" content="text/html;charset=utf-8">
<meta http-eqiv="content-type" content="text/html;charset=utf-8"> <title>%s</title>
<title>%s</title> <link rel=stylesheet href="../style/book.css">
<link rel=stylesheet href="../style/book.css"> </head>
</head> <body>
<body> <div id="container">
<div id="container"> <div id="background"></div>
<div id="background"></div> <table cellspacing="0" cellpadding="0">
<table cellspacing="0" cellpadding="0"> <tbody>`, title)
<tbody>`, title)
for _, seg := range segs { for _, seg := range segs {
fmt.Printf( fmt.Printf(
`<tr> `<tr>
<td class=docs>%s</td> <td class=docs>%s</td>
<td class=code>%s</td> <td class=code>%s</td>
</tr>`, seg.docsRendered, seg.codeRendered) </tr>`, seg.docsRendered, seg.codeRendered)
} }
fmt.Print(`</tbody> fmt.Print(`</tbody></table></div></body></html>`)
</table>
</div>
</body>
</html>`)
} }