travis: add travis check
Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
This commit is contained in:
parent
b595e50fec
commit
c3855dab6d
5 changed files with 27 additions and 6 deletions
5
parse.go
5
parse.go
|
@ -3,6 +3,7 @@ package mtree
|
|||
import (
|
||||
"bufio"
|
||||
"io"
|
||||
"path/filepath"
|
||||
"strings"
|
||||
)
|
||||
|
||||
|
@ -70,12 +71,12 @@ func ParseSpec(r io.Reader) (*DirectoryHierarchy, error) {
|
|||
}
|
||||
// parse the options
|
||||
f := strings.Fields(str)
|
||||
if strings.Contains(str, "/") {
|
||||
e.Name = filepath.Clean(f[0])
|
||||
if strings.Contains(e.Name, "/") {
|
||||
e.Type = FullType
|
||||
} else {
|
||||
e.Type = RelativeType
|
||||
}
|
||||
e.Name = f[0]
|
||||
e.Keywords = f[1:]
|
||||
e.Parent = creator.curDir
|
||||
for i := range e.Keywords {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue