diff options
author | Alberto Cortés <alberto@sourced.tech> | 2017-03-01 17:33:15 +0100 |
---|---|---|
committer | Alberto Cortés <alberto@sourced.tech> | 2017-03-01 17:58:23 +0100 |
commit | da704cfac743a91474baf45df226e5ec034146b0 (patch) | |
tree | 3b64c2706cc515c83dcfd66e31fc6a8cf919bb1c /plumbing/object/file.go | |
parent | 09e4358e03e5eccf5597be9bdcd3ffeab7618fb2 (diff) | |
download | go-git-da704cfac743a91474baf45df226e5ec034146b0.tar.gz |
replace os.FileMode use with filemode.FileMode
Diffstat (limited to 'plumbing/object/file.go')
-rw-r--r-- | plumbing/object/file.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/plumbing/object/file.go b/plumbing/object/file.go index 4866777..5f24cf0 100644 --- a/plumbing/object/file.go +++ b/plumbing/object/file.go @@ -3,9 +3,9 @@ package object import ( "bytes" "io" - "os" "strings" + "srcd.works/go-git.v4/plumbing/filemode" "srcd.works/go-git.v4/plumbing/storer" "srcd.works/go-git.v4/utils/ioutil" ) @@ -16,13 +16,13 @@ type File struct { // depending of the function that generates it. Name string // Mode is the file mode. - Mode os.FileMode + Mode filemode.FileMode // Blob with the contents of the file. Blob } // NewFile returns a File based on the given blob object -func NewFile(name string, m os.FileMode, b *Blob) *File { +func NewFile(name string, m filemode.FileMode, b *Blob) *File { return &File{Name: name, Mode: m, Blob: *b} } @@ -81,7 +81,7 @@ func (iter *FileIter) Next() (*File, error) { return nil, err } - if entry.Mode.IsDir() || entry.Mode == SubmoduleMode { + if entry.Mode == filemode.Dir || entry.Mode == filemode.Submodule { continue } |