diff --git a/pkg/file/mutator.go b/pkg/file/mutator.go index ab29ec1..d2e8ca9 100644 --- a/pkg/file/mutator.go +++ b/pkg/file/mutator.go @@ -157,13 +157,13 @@ func identifyLanguageStyle(path string) *languageStyle { func getFileContents(path string) []byte { f, err := os.Open(path) if err != nil { - fmt.Fprintf(os.Stderr, "unable to open %v", path) + fmt.Fprintf(os.Stderr, "unable to open %v\n", path) } // This will be an issue with really large files... contents, err := ioutil.ReadAll(f) if err != nil { - fmt.Fprintf(os.Stderr, "unable to read file %v", path) + fmt.Fprintf(os.Stderr, "unable to read file %v\n", path) } return contents } diff --git a/pkg/processor/processor.go b/pkg/processor/processor.go index d414f43..ed2f9ca 100644 --- a/pkg/processor/processor.go +++ b/pkg/processor/processor.go @@ -82,7 +82,7 @@ func (p *processor) visit(path string, f os.FileInfo, err error) error { if shouldSkip(path) { return nil } - if !f.IsDir() { + if f.Mode().IsRegular() { p.wg.Add(1) go func(path string) { if !p.visitFunc(path, p.dryRun) {