Fix spelling and go vet errors
authorDerek Perkins <derek@derekperkins.com>
Sat, 13 Feb 2016 09:24:25 +0000 (02:24 -0700)
committerAnthony Fok <foka@debian.org>
Sat, 13 Feb 2016 11:08:48 +0000 (19:08 +0800)
hugolib/site.go
parser/page.go
tpl/template_funcs.go

index 037ae2750ef6ec4ed900586c3acaaa72626d9d29..6a4ee8c707930860ccc74008d7b1295e7fdc5131 100644 (file)
@@ -544,7 +544,7 @@ func (s *Site) ReBuild(events []fsnotify.Event) error {
                // once readResults is finished it will close coordinator and move along
                <-coordinator
                // allow that routine to finish, then close page & fileconvchan as we've sent
-               // everthing to them we need to.
+               // everything to them we need to.
                close(pageChan)
                close(fileConvChan)
 
@@ -553,7 +553,7 @@ func (s *Site) ReBuild(events []fsnotify.Event) error {
 
                s.timerStep("read & convert pages from source")
 
-               fmt.Errorf("%s", errs)
+               fmt.Errorf("%v", errs)
 
                s.setupPrevNext()
                if err = s.BuildSiteMeta(); err != nil {
@@ -582,8 +582,6 @@ func (s *Site) ReBuild(events []fsnotify.Event) error {
        } else {
                return err
        }
-
-       return nil
 }
 
 func (s *Site) Analyze() error {
index d64195ee1ce2262a6c16955d4fc4947905dc6a8e..9bffc6993d3d1c5f3ef1f0983604ff523136b9e5 100644 (file)
@@ -247,7 +247,7 @@ func determineDelims(firstLine []byte) (left, right []byte) {
 }
 
 // extractFrontMatterDelims takes a frontmatter from the content bufio.Reader.
-// Begining white spaces of the bufio.Reader must be trimmed before call this
+// Beginning white spaces of the bufio.Reader must be trimmed before call this
 // function.
 func extractFrontMatterDelims(r *bufio.Reader, left, right []byte) (fm FrontMatter, err error) {
        var (
index 3c4a87474ab1cfb80033aa6884b3fc2628032299..0f71fed186e10849daa13048ac9750b0d675679b 100644 (file)
@@ -1209,7 +1209,7 @@ func trim(a interface{}, b string) (string, error) {
        return strings.Trim(aStr, b), nil
 }
 
-// replace all occurences of b with c in a
+// replace all occurrences of b with c in a
 func replace(a, b, c interface{}) (string, error) {
        aStr, err := cast.ToStringE(a)
        if err != nil {