go vet fixes

This commit is contained in:
2017-08-05 16:54:10 -07:00
parent e6735a3ecc
commit ecb8351ef8
2 changed files with 3 additions and 4 deletions
+2 -2
View File
@@ -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
+1 -2
View File
@@ -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
}
}