Refactor debug into debug module

This commit is contained in:
Alexander Neumann
2015-01-14 22:08:48 +01:00
parent bcb19c811b
commit 25a214809b
18 changed files with 318 additions and 238 deletions

26
cmd/ram/main.go Normal file
View File

@@ -0,0 +1,26 @@
package main
import (
"os"
"github.com/restic/restic"
)
func main() {
max := int(1e6)
nodes := make([]*restic.Node, 0, max)
fi, err := os.Lstat("main.go")
if err != nil {
panic(err)
}
for i := 0; i < max; i++ {
node, err := restic.NodeFromFileInfo("main.go", fi)
if err != nil {
panic(err)
}
nodes = append(nodes, node)
}
}