Skip to content

Commit

Permalink
Fixes formatting using gofmt.
Browse files Browse the repository at this point in the history
  • Loading branch information
kushaldas committed Apr 1, 2015
1 parent 92f758e commit 4437934
Showing 1 changed file with 17 additions and 18 deletions.
35 changes: 17 additions & 18 deletions scrdkd.go
Expand Up @@ -307,7 +307,7 @@ func read_post(filename string, conf Configuration) Post {
if i != -1 {
tagline = strings.TrimSpace(line[i+8:])
if tagline == "" {
tagline = "Uncategorized"
tagline = "Uncategorized"
}
continue
}
Expand Down Expand Up @@ -831,18 +831,18 @@ func create_archive(years map[string][]Post) {
Check if missing index page.
*/
func check_index(indexname string, index int) bool {
var name string

if indexname == "index" {
name = fmt.Sprintf("./output/%s-%d.html", indexname, index)
} else {
name = fmt.Sprintf("./output/categories/%s-%d.html", indexname, index)
}
if exists(name) {
return true
} else {
return false
}
var name string

if indexname == "index" {
name = fmt.Sprintf("./output/%s-%d.html", indexname, index)
} else {
name = fmt.Sprintf("./output/categories/%s-%d.html", indexname, index)
}
if exists(name) {
return true
} else {
return false
}

}

Expand All @@ -864,9 +864,9 @@ func create_index_files(ps []Post, indexname string) {
sort_index = append(sort_index, ps[i])
num = num + 1
if num == POSTN {
if ! check_index(indexname, index) {
index_page_flag = true
}
if !check_index(indexname, index) {
index_page_flag = true
}

/* Only changed indexes should get rebuild*/
if index_page_flag == true {
Expand Down Expand Up @@ -990,8 +990,7 @@ func site_rebuild(rebuild, rebuild_index bool) {

sort.Sort(ByODate(ps))


create_index_files(ps, "index")
create_index_files(ps, "index")
// If required then rebuild the primary index pages.
if rebuild_index == true {

Expand Down

0 comments on commit 4437934

Please sign in to comment.