travis: add travis check

Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
This commit is contained in:
Vincent Batts 2016-04-06 12:48:35 -04:00
parent b595e50fec
commit c3855dab6d
5 changed files with 27 additions and 6 deletions

View file

@ -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 {