diff --git a/main.go b/main.go index 0c85741..51d6f87 100644 --- a/main.go +++ b/main.go @@ -20,11 +20,9 @@ type holder struct { connection *websocket.Conn } -const exampleSlidesDirName = "example" - func main() { port := flag.String("port", "8080", "http port the server is starting on") - rootDir := flag.String("dir", exampleSlidesDirName, "root dir of your presentation") + rootDir := flag.String("dir", "example", "root dir of your presentation") title := flag.String("title", "Slide", "html title") devMode := flag.Bool("dev", false, "dev true to start a filewatcher and reload the edited slide") flag.Parse() diff --git a/slides.go b/slides.go index c8ec6b2..7d86362 100644 --- a/slides.go +++ b/slides.go @@ -60,7 +60,7 @@ func (h *holder) parse() { h.slides = make([]slide, 0) filepath.Walk(h.dir, func(path string, info os.FileInfo, err error) error { if info == nil || info.IsDir() { - return filepath.SkipDir + return nil } // reading all the files, check file ext before reading? content, err := ioutil.ReadFile(path)