Include filename in reading/parsing errors.
Fixes issue #2.
diff --git a/golint/golint.go b/golint/golint.go
index d834c50..6eecea4 100644
--- a/golint/golint.go
+++ b/golint/golint.go
@@ -30,14 +30,14 @@
func lintFile(filename string) {
src, err := ioutil.ReadFile(filename)
if err != nil {
- log.Printf("Failed reading file: %v", err)
+ log.Printf("Failed reading %v: %v", filename, err)
return
}
l := new(lint.Linter)
ps, err := l.Lint(filename, src)
if err != nil {
- log.Printf("Failed parsing file: %v", err)
+ log.Printf("Failed parsing %v: %v", filename, err)
return
}
for _, p := range ps {