/usr/share/gocode/src/github.com/yosssi/gohtml/html_document.go is in golang-github-yosssi-gohtml-dev 0.0~git20150923.0.ccf383e-4.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | package gohtml
import "bytes"
// An htmlDocument represents an HTML document.
type htmlDocument struct {
elements []element
}
// html generates an HTML source code and returns it.
func (htmlDoc *htmlDocument) html() string {
bf := &bytes.Buffer{}
for _, e := range htmlDoc.elements {
e.write(bf, startIndent)
}
return bf.String()
}
// append appends an element to the htmlDocument.
func (htmlDoc *htmlDocument) append(e element) {
htmlDoc.elements = append(htmlDoc.elements, e)
}
|