mirror of
https://github.com/vbatts/go-mtree.git
synced 2025-07-05 15:18:30 +00:00
*: loads of walking features
For the most part, all the keywords for a standard mtree spec now have a function to produce the contents for a creator. These are used in the "walk" function, and will be used next in the "check" logic. This is still a WIP, as the DirectoryHierarchy produced from the current Walk() is not all-together a valid document. Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
This commit is contained in:
parent
7842a80f95
commit
455edf6d21
8 changed files with 332 additions and 0 deletions
16
walk_test.go
Normal file
16
walk_test.go
Normal file
|
@ -0,0 +1,16 @@
|
|||
package mtree
|
||||
|
||||
import (
|
||||
"os"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestWalk(t *testing.T) {
|
||||
dh, err := Walk(".", nil, append(DefaultKeywords, "cksum", "md5", "rmd160digest", "sha1", "sha256", "sha512"))
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
if _, err = dh.WriteTo(os.Stdout); err != nil {
|
||||
t.Error(err)
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue