clear the right file
This commit is contained in:
parent
48ed5014eb
commit
0f4f874b9e
1 changed files with 2 additions and 2 deletions
4
main.go
4
main.go
|
@ -173,6 +173,8 @@ func main() {
|
||||||
}
|
}
|
||||||
|
|
||||||
for name, section := range sections {
|
for name, section := range sections {
|
||||||
|
// TODO: come up with sth better as one might have content there.
|
||||||
|
os.Remove(section.File)
|
||||||
section.Write(section.File)
|
section.Write(section.File)
|
||||||
fmt.Printf("written section listing %s to %s\n", name, section.File)
|
fmt.Printf("written section listing %s to %s\n", name, section.File)
|
||||||
}
|
}
|
||||||
|
@ -180,8 +182,6 @@ func main() {
|
||||||
section, ok := sections[seconOnRoot]
|
section, ok := sections[seconOnRoot]
|
||||||
if ok {
|
if ok {
|
||||||
sectionFile := filepath.Join(destination, "index."+ext)
|
sectionFile := filepath.Join(destination, "index."+ext)
|
||||||
// TODO: come up with sth better as one might have content there.
|
|
||||||
os.Remove(sectionFile)
|
|
||||||
section.Write(sectionFile)
|
section.Write(sectionFile)
|
||||||
fmt.Printf("written section listing for root to %s\n", section.File)
|
fmt.Printf("written section listing for root to %s\n", section.File)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue