go vet fixes
This commit is contained in:
+2
-2
@@ -58,7 +58,7 @@ func (ch *CaddyHugo) Build() error {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (ch CaddyHugo) BasePath() string {
|
func (ch *CaddyHugo) BasePath() string {
|
||||||
return "/hugo"
|
return "/hugo"
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -82,7 +82,7 @@ func (ch *CaddyHugo) Publish() error {
|
|||||||
return nil
|
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
|
var doc *acedoc.Document
|
||||||
if docref != nil {
|
if docref != nil {
|
||||||
doc = docref.doc
|
doc = docref.doc
|
||||||
|
|||||||
+1
-2
@@ -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,
|
// 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
|
// 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.
|
// 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" {
|
if filepath.Ext(name) != ".md" {
|
||||||
name += ".md"
|
name += ".md"
|
||||||
}
|
}
|
||||||
@@ -101,7 +101,6 @@ func (ch CaddyHugo) NewContent(name, ctype string) (string, error) {
|
|||||||
out, err := cmd.CombinedOutput()
|
out, err := cmd.CombinedOutput()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return filename, fmt.Errorf("error running 'hugo new': %v; %v", err, string(out))
|
return filename, fmt.Errorf("error running 'hugo new': %v; %v", err, string(out))
|
||||||
return filename, err
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user