go fmt code

This commit is contained in:
Las Zenow 2012-08-31 00:24:42 +02:00
parent def9f7bccf
commit e7adec0988

View file

@ -6,8 +6,8 @@ import (
"labix.org/v2/mgo/bson" "labix.org/v2/mgo/bson"
"net/http" "net/http"
"regexp" "regexp"
"strings"
"strconv" "strconv"
"strings"
) )
type chapter struct { type chapter struct {
@ -99,14 +99,14 @@ func chapterList(e *epub.Epub, file string, id string, base string) (string, str
} }
/* if is the same chapter check the previous */ /* if is the same chapter check the previous */
i := activeIndx-1 i := activeIndx - 1
for i >= 0 && strings.Contains(chapters[i].Link, "#") { for i >= 0 && strings.Contains(chapters[i].Link, "#") {
i-- i--
} }
if i >= 0 { if i >= 0 {
prev = chapters[i].Link prev = chapters[i].Link
} }
i = activeIndx+1 i = activeIndx + 1
for i < len(chapters) && strings.Contains(chapters[i].Link, "#") { for i < len(chapters) && strings.Contains(chapters[i].Link, "#") {
i++ i++
} }