Parcourir la source

default to public if no path provided

Dennis Rodewyk il y a 5 ans
Parent
commit
cff333e96b
1 fichiers modifiés avec 3 ajouts et 0 suppressions
  1. 3 0
      hugo-encrypt.go

+ 3 - 0
hugo-encrypt.go

@@ -64,6 +64,9 @@ func encryptPage(path string) {
 
 func main() {
 	sitePath := os.Args[1]
+	if !sitePath {
+        sitePath = "public"
+    }
 	err := filepath.Walk(sitePath, func(path string, f os.FileInfo, err error) error {
 		if f == nil {
 			return err