*: make Keyword and KeyVal pervasive

Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
This commit is contained in:
Vincent Batts 2016-11-17 19:47:31 -05:00
parent 5d26726bb1
commit 4eec68be4b
Signed by: vbatts
GPG key ID: 10937E57733F1362
18 changed files with 434 additions and 367 deletions

View file

@ -48,7 +48,7 @@ func ParseSpec(r io.Reader) (*DirectoryHierarchy, error) {
// parse the options
f := strings.Fields(str)
e.Name = f[0]
e.Keywords = f[1:]
e.Keywords = StringToKeyVals(f[1:])
if e.Name == "/set" {
creator.curSet = &e
} else if e.Name == "/unset" {
@ -80,7 +80,7 @@ func ParseSpec(r io.Reader) (*DirectoryHierarchy, error) {
} else {
e.Type = RelativeType
}
e.Keywords = f[1:]
e.Keywords = StringToKeyVals(f[1:])
// TODO: gather keywords if using tar stream
e.Parent = creator.curDir
for i := range e.Keywords {