0c107c3a72
The Idea is to Implement a tree of sorts (At least for now) and then displaying the children of the current Node and traversing them.
12 lines
236 B
Go
12 lines
236 B
Go
package main
|
|
|
|
type FileNode struct{
|
|
children [] FileNode
|
|
path string
|
|
parent *FileNode
|
|
}
|
|
|
|
func (f *FileNode) addChildren(path string){
|
|
f.children = append(f.children, FileNode{children: make([]FileNode, 0), path: path, parent: f})
|
|
}
|