tar: create and validate a manifest from a tar stream
This commit contains added features to go-mtree that allows user to create an mtree spec with '-T' option when specifying a tar archive. Users can also validate an mtree spec against a tar archive with an mtree spec. Also for the test archive, there is a mixture of files, and folders (empty & non-empty), and symlinks (broken & unbroken). Signed-off-by: Stephen Chung <schung@redhat.com>
This commit is contained in:
parent
f0f15a0e49
commit
decc72b335
7 changed files with 494 additions and 66 deletions
1
parse.go
1
parse.go
|
@ -81,6 +81,7 @@ func ParseSpec(r io.Reader) (*DirectoryHierarchy, error) {
|
|||
e.Type = RelativeType
|
||||
}
|
||||
e.Keywords = f[1:]
|
||||
// TODO: gather keywords if using tar stream
|
||||
e.Parent = creator.curDir
|
||||
for i := range e.Keywords {
|
||||
kv := KeyVal(e.Keywords[i])
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue