2
2
mirror of https://github.com/octoleo/restic.git synced 2024-10-31 19:02:32 +00:00
restic/cmd/ram/main.go

27 lines
352 B
Go
Raw Normal View History

2015-01-14 21:08:48 +00:00
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)
}
}