source: Fix golint godoc issues

This commit is contained in:
Cameron Moore 2018-09-06 14:42:55 -05:00 committed by Bjørn Erik Pedersen
parent 5f2e1cb896
commit 600047ff1c
3 changed files with 46 additions and 17 deletions

View file

@ -76,6 +76,7 @@ func NewSourceSpec(ps *helpers.PathSpec, fs afero.Fs) *SourceSpec {
}
// IgnoreFile returns whether a given file should be ignored.
func (s *SourceSpec) IgnoreFile(filename string) bool {
if filename == "" {
if _, ok := s.SourceFs.(*afero.OsFs); ok {
@ -109,6 +110,8 @@ func (s *SourceSpec) IgnoreFile(filename string) bool {
return false
}
// IsRegularSourceFile returns whether filename represents a regular file in the
// source filesystem.
func (s *SourceSpec) IsRegularSourceFile(filename string) (bool, error) {
fi, err := helpers.LstatIfPossible(s.SourceFs, filename)
if err != nil {