Skip to content

Commit

Permalink
Merge pull request #4 from midnightrun/master
Browse files Browse the repository at this point in the history
Move to upstream package `github.com/radovskyb/watcher`
  • Loading branch information
Phantas0s authored Oct 5, 2019
2 parents 54ddb5d + bc40427 commit 8597a96
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 5 deletions.
6 changes: 4 additions & 2 deletions cmd/testomatic.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ import (
"time"

"github.com/Phantas0s/testomatic/internal/config"
"github.com/Phantas0s/watcher"
"github.com/gen2brain/beeep"
"github.com/radovskyb/watcher"
)

const (
Expand Down Expand Up @@ -50,7 +50,9 @@ func Run() error {
w.IgnoreHiddenFiles(conf.Watch.IgnoreHidden)
w.Ignore(conf.Watch.Ignore...)

w.FilterFiles(conf.Watch.Regex)
r := regexp.MustCompile(conf.Watch.Regex)
w.AddFilterHook(watcher.RegexFilterHook(r, false))

if err := w.AddRecursive(conf.Watch.Root); err != nil {
return err
}
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ module github.com/Phantas0s/testomatic
go 1.12

require (
github.com/Phantas0s/watcher v1.0.3-0.20180503173839-75cb19e7f8c4
github.com/gen2brain/beeep v0.0.0-20190603194150-07ff5e574111
github.com/godbus/dbus v4.1.0+incompatible // indirect
github.com/gopherjs/gopherwasm v1.1.0 // indirect
github.com/nu7hatch/gouuid v0.0.0-20131221200532-179d4d0c4d8d // indirect
github.com/radovskyb/watcher v1.0.6
github.com/tadvi/systray v0.0.0-20190226123456-11a2b8fa57af // indirect
golang.org/x/sys v0.0.0-20190712062909-fae7ac547cb7 // indirect
gopkg.in/toast.v1 v1.0.0-20180812000517-0a84660828b2 // indirect
Expand Down
11 changes: 9 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
@@ -1,15 +1,22 @@
github.com/Phantas0s/watcher v1.0.3-0.20180503173839-75cb19e7f8c4 h1:eLs0Oh2fv8kb7aAdyOMyKjsR1sSpbzOVpGDEmL2wm1g=
github.com/Phantas0s/watcher v1.0.3-0.20180503173839-75cb19e7f8c4/go.mod h1:7Q5gD05YXQnmZwPqRny1ZNjfeZL3/ML3CKvFMPi7Juk=
github.com/gen2brain/beeep v0.0.0-20190603194150-07ff5e574111 h1:RqBJYx7nqCnDQhJtIy7jrZnJ2pwBRnYhRuVQrrlX3pU=
github.com/gen2brain/beeep v0.0.0-20190603194150-07ff5e574111/go.mod h1:GprdPCZglWh5OMcIDpeKBxuUJI+fEDOTVUfxZeda4zo=
github.com/godbus/dbus v4.1.0+incompatible h1:WqqLRTsQic3apZUK9qC5sGNfXthmPXzUZ7nQPrNITa4=
github.com/godbus/dbus v4.1.0+incompatible/go.mod h1:/YcGZj5zSblfDWMMoOzV4fas9FZnQYTkDnsGvmh2Grw=
github.com/gopherjs/gopherjs v0.0.0-20180825215210-0210a2f0f73c h1:16eHWuMGvCjSfgRJKqIzapE78onvvTbdi1rMkU00lZw=
github.com/gopherjs/gopherjs v0.0.0-20180825215210-0210a2f0f73c/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY=
github.com/gopherjs/gopherwasm v1.1.0 h1:fA2uLoctU5+T3OhOn2vYP0DVT6pxc7xhTlBB1paATqQ=
github.com/gopherjs/gopherwasm v1.1.0/go.mod h1:SkZ8z7CWBz5VXbhJel8TxCmAcsQqzgWGR/8nMhyhZSI=
github.com/nu7hatch/gouuid v0.0.0-20131221200532-179d4d0c4d8d h1:VhgPp6v9qf9Agr/56bj7Y/xa04UccTW04VP0Qed4vnQ=
github.com/nu7hatch/gouuid v0.0.0-20131221200532-179d4d0c4d8d/go.mod h1:YUTz3bUH2ZwIWBy3CJBeOBEugqcmXREj14T+iG/4k4U=
github.com/radovskyb/watcher v1.0.6 h1:8WIQ9UxEYMZjem1OwU7dVH94DXXk9mAIE1i8eqHD+IY=
github.com/radovskyb/watcher v1.0.6/go.mod h1:78okwvY5wPdzcb1UYnip1pvrZNIVEIh/Cm+ZuvsUYIg=
github.com/tadvi/systray v0.0.0-20190226123456-11a2b8fa57af h1:6yITBqGTE2lEeTPG04SN9W+iWHCRyHqlVYILiSXziwk=
github.com/tadvi/systray v0.0.0-20190226123456-11a2b8fa57af/go.mod h1:4F09kP5F+am0jAwlQLddpoMDM+iewkxxt6nxUQ5nq5o=
golang.org/x/sys v0.0.0-20190712062909-fae7ac547cb7 h1:LepdCS8Gf/MVejFIt8lsiexZATdoGVyp5bcyS+rYoUI=
golang.org/x/sys v0.0.0-20190712062909-fae7ac547cb7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/toast.v1 v1.0.0-20180812000517-0a84660828b2 h1:MZF6J7CV6s/h0HBkfqebrYfKCVEo5iN+wzE4QhV3Evo=
gopkg.in/toast.v1 v1.0.0-20180812000517-0a84660828b2/go.mod h1:s1Sn2yZos05Qfs7NKt867Xe18emOmtsO3eAKbDaon0o=
gopkg.in/yaml.v2 v2.2.2 h1:ZCJp+EgiOT7lHqUV2J862kp8Qj64Jo6az82+3Td9dZw=
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=

0 comments on commit 8597a96

Please sign in to comment.