Assisted-by: GLM 5.3 Flash
This commit is contained in:
+7
-2
@@ -20,8 +20,13 @@ type Document struct {
|
||||
footer []string
|
||||
}
|
||||
|
||||
// Root returns the document's root table.
|
||||
func (d *Document) Root() *Table { return d.root }
|
||||
// Root returns the document's root table. A nil document has no root.
|
||||
func (d *Document) Root() *Table {
|
||||
if d == nil {
|
||||
return nil
|
||||
}
|
||||
return d.root
|
||||
}
|
||||
|
||||
// Map returns the value tree, the shape ParseMap gives. It is the tree the
|
||||
// document was parsed into, not a copy.
|
||||
|
||||
Reference in New Issue
Block a user