This file is indexed.

/usr/share/gocode/src/github.com/masterzen/simplexml/dom/document.go is in golang-github-masterzen-simplexml-dev 0.0~git20140219.95ba304-1.

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
23
24
25
26
27
28
29
30
31
32
33
34
35
package dom

import (
	"bytes"
	"fmt"
)

type Document struct {
	root *Element
	PrettyPrint bool
	Indentation string
	DocType bool
}

func CreateDocument() *Document {
	return &Document{ PrettyPrint: false, Indentation: "  ", DocType: true }
}

func (doc *Document) SetRoot(node *Element) {
	node.parent = nil
	doc.root = node
}

func (doc *Document) String() string {
	var b bytes.Buffer
	if doc.DocType {
		fmt.Fprintln(&b, `<?xml version="1.0" encoding="utf-8" ?>`)
	}
	
	if doc.root != nil {
		doc.root.Bytes(&b, doc.PrettyPrint, doc.Indentation, 0)
	}
	
	return string(b.Bytes())
}