Cleanup formatting - go fmt ./...

Remember to run go fmt ./... before committing.  Looks sternly in mirror
This commit is contained in:
Noah Campbell 2013-08-30 14:38:33 -07:00
parent 4ed43e8076
commit a792ec09ce
3 changed files with 14 additions and 13 deletions

View file

@ -334,7 +334,7 @@ func MakePermalink(domain string, path string) string {
}
func getSummaryString(content []byte) ([]byte, bool) {
if (bytes.Contains(content, summaryDivider)) {
if bytes.Contains(content, summaryDivider) {
return bytes.Split(content, summaryDivider)[0], false
} else {
plainContent := StripHTML(StripShortcodes(string(content)))

View file

@ -203,7 +203,7 @@ func (s *Site) initialize() {
s.checkDirectories()
staticDir := s.Config.GetAbsPath(s.Config.StaticDir+"/")
staticDir := s.Config.GetAbsPath(s.Config.StaticDir + "/")
walker := func(path string, fi os.FileInfo, err error) error {
if err != nil {
@ -212,7 +212,7 @@ func (s *Site) initialize() {
}
if fi.IsDir() {
if (path == staticDir) {
if path == staticDir {
return filepath.SkipDir
}
site.Directories = append(site.Directories, path)
@ -432,7 +432,7 @@ func inStringArray(arr []string, el string) bool {
func (s *Site) RenderAliases() error {
for i, p := range s.Pages {
for _, a := range p.Aliases {
t := "alias";
t := "alias"
if strings.HasSuffix(a, ".xhtml") {
t = "alias-xhtml"
}

View file

@ -1,8 +1,8 @@
package hugolib
import (
"fmt"
"bytes"
"fmt"
"strings"
"testing"
)
@ -164,7 +164,8 @@ func TestRenderThingOrDefault(t *testing.T) {
if string(html.Bytes()) != test.expected {
t.Errorf("Content does not match. Expected '%s', got '%s'", test.expected, html)
}
}}
}
}
func TestSetOutFile(t *testing.T) {
s := new(Site)