|
@@ -91,21 +91,6 @@ func main() {
|
|
os.Exit(1)
|
|
os.Exit(1)
|
|
} else {
|
|
} else {
|
|
fmt.Printf("--sitepath set to %q\n", sitepath.value)
|
|
fmt.Printf("--sitepath set to %q\n", sitepath.value)
|
|
- }
|
|
|
|
- err := filepath.Walk(sitepath.value, func(path string, f os.FileInfo, err error) error {
|
|
|
|
- if f == nil {
|
|
|
|
- return err
|
|
|
|
- }
|
|
|
|
- if f.IsDir() {
|
|
|
|
- return nil
|
|
|
|
- }
|
|
|
|
- ok := strings.HasSuffix(f.Name(), ".html")
|
|
|
|
- if ok {
|
|
|
|
- encryptPage(path)
|
|
|
|
- }
|
|
|
|
- return nil
|
|
|
|
- })
|
|
|
|
- if err != nil {
|
|
|
|
- fmt.Printf("filepath.Walk() returned %v\n", err)
|
|
|
|
|
|
+ os.Exit(1)
|
|
}
|
|
}
|
|
}
|
|
}
|