From 37a547fd4391261c7ce8e9196560144fd2e34702 Mon Sep 17 00:00:00 2001 From: Gokcehan Date: Wed, 17 Aug 2016 22:42:36 +0300 Subject: [PATCH] error context for completions --- comp.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/comp.go b/comp.go index ebd6e66..788dc3a 100644 --- a/comp.go +++ b/comp.go @@ -68,14 +68,14 @@ func matchExec(s string) string { fi, err := ioutil.ReadDir(p) if err != nil { - log.Print(err) + log.Printf("reading path: %s", err) } for _, f := range fi { if strings.HasPrefix(f.Name(), s) { f, err = os.Stat(path.Join(p, f.Name())) if err != nil { - log.Print(err) + log.Printf("getting file information: %s", err) } if !f.Mode().IsRegular() || f.Mode()&0111 == 0 { @@ -102,12 +102,12 @@ func matchFile(s string) string { wd, err := os.Getwd() if err != nil { - log.Print(err) + log.Printf("getting current directory: %s", err) } fi, err := ioutil.ReadDir(wd) if err != nil { - log.Print(err) + log.Printf("reading directory: %s", err) } for _, f := range fi {