From fe6b152b1986602133e70b4f35a0cc80ecda2c67 Mon Sep 17 00:00:00 2001 From: gutmet Date: Sun, 11 Oct 2020 13:39:17 +0200 Subject: [PATCH] update to recent goutil split --- ambrowse.go | 11 ++++++----- go.mod | 4 +++- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/ambrowse.go b/ambrowse.go index babc2dc..55cab87 100644 --- a/ambrowse.go +++ b/ambrowse.go @@ -1,7 +1,8 @@ package main import ( - "git.gutmet.org/goutil.git" + goutil "git.gutmet.org/goutil.git/html" + "git.gutmet.org/goutil.git/misc" "github.com/fsnotify/fsnotify" "golang.org/x/net/html" "log" @@ -63,7 +64,7 @@ func readLine(line string) string { } func getDirectory() string { - home, err := goutil.HomeDir() + home, err := misc.HomeDir() if err != nil { log.Fatal("Cannot identify home directory", err) } @@ -148,14 +149,14 @@ func clean(files []string) { func digest(dir string, created []string) { for _, file := range created { - if filepath.Ext(file) == ".html" && goutil.PathExists(file) { + if filepath.Ext(file) == ".html" && misc.PathExists(file) { b := readHTML(file) if b.title != "" { - err := goutil.AppendToFile(filepath.Join(dir, BOOKFILE), b.yaml()) + err := misc.AppendToFile(filepath.Join(dir, BOOKFILE), b.yaml()) if err != nil { log.Println(err) } - goutil.Notify(NAME, b.String()) + misc.Notify(NAME, b.String()) } } } diff --git a/go.mod b/go.mod index 2b503f0..fede11b 100644 --- a/go.mod +++ b/go.mod @@ -1,7 +1,9 @@ module git.gutmet.org/ambrowse.git +go 1.14 + require ( - git.gutmet.org/goutil.git v0.0.0-20190113180148-bb2d3e26ea6c + git.gutmet.org/goutil.git v0.0.0-20201011110813-b9f7ae29b4e6 github.com/fsnotify/fsnotify v1.4.7 golang.org/x/net v0.0.0-20190110200230-915654e7eabc golang.org/x/sys v0.0.0-20190109145017-48ac38b7c8cb // indirect