diff options
author | Albert Nigmatzianov <albertnigma@gmail.com> | 2017-03-09 18:18:12 +0500 |
---|---|---|
committer | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2017-03-09 14:18:12 +0100 |
commit | 48120ccfd2138ff2b308081cd7cb9cee033db691 (patch) | |
tree | e008e9b8ebccdd897d51ae152c4d2b89215237de /tpl | |
parent | 560ed6e686f19c58dc98af9f47bb35c81f4d7979 (diff) |
all: Fix some govet complaints
Diffstat (limited to 'tpl')
-rw-r--r-- | tpl/tplimpl/template.go | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/tpl/tplimpl/template.go b/tpl/tplimpl/template.go index 012319104..b625f570b 100644 --- a/tpl/tplimpl/template.go +++ b/tpl/tplimpl/template.go @@ -452,6 +452,7 @@ func (t *GoHTMLTemplate) loadTemplates(absPath string, prefix string) { if err != nil { return nil } + t.Log.DEBUG.Println("Template path", path) if fi.Mode()&os.ModeSymlink == os.ModeSymlink { link, err := filepath.EvalSymlinks(absPath) @@ -459,11 +460,13 @@ func (t *GoHTMLTemplate) loadTemplates(absPath string, prefix string) { t.Log.ERROR.Printf("Cannot read symbolic link '%s', error was: %s", absPath, err) return nil } + linkfi, err := t.Fs.Source.Stat(link) if err != nil { t.Log.ERROR.Printf("Cannot stat '%s', error was: %s", link, err) return nil } + if !linkfi.Mode().IsRegular() { t.Log.ERROR.Printf("Symbolic links for directories not supported, skipping '%s'", absPath) } |