From ecb8351ef83108ad3578eeb3d308ea1d1ee83ec1 Mon Sep 17 00:00:00 2001 From: Stephen Searles Date: Sat, 5 Aug 2017 16:54:10 -0700 Subject: [PATCH] go vet fixes --- caddyhugo.go | 4 ++-- content.go | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/caddyhugo.go b/caddyhugo.go index bcb06cb..41f9119 100644 --- a/caddyhugo.go +++ b/caddyhugo.go @@ -58,7 +58,7 @@ func (ch *CaddyHugo) Build() error { return nil } -func (ch CaddyHugo) BasePath() string { +func (ch *CaddyHugo) BasePath() string { return "/hugo" } @@ -82,7 +82,7 @@ func (ch *CaddyHugo) Publish() error { return nil } -func (ch CaddyHugo) TmplData(r *http.Request, docref *docref) interface{} { +func (ch *CaddyHugo) TmplData(r *http.Request, docref *docref) interface{} { var doc *acedoc.Document if docref != nil { doc = docref.doc diff --git a/content.go b/content.go index 6e32d3a..be28775 100644 --- a/content.go +++ b/content.go @@ -79,7 +79,7 @@ func GetContent(siteRoot string, sites *hugolib.HugoSites) ([]Content, error) { // If ctype is empty string, "default" is used. The return value is the filename, // which may be modified from the title and includes the content type if other than // default, but does not include the full directory relative to the site. -func (ch CaddyHugo) NewContent(name, ctype string) (string, error) { +func (ch *CaddyHugo) NewContent(name, ctype string) (string, error) { if filepath.Ext(name) != ".md" { name += ".md" } @@ -101,7 +101,6 @@ func (ch CaddyHugo) NewContent(name, ctype string) (string, error) { out, err := cmd.CombinedOutput() if err != nil { return filename, fmt.Errorf("error running 'hugo new': %v; %v", err, string(out)) - return filename, err } }