refactor: project structure

This commit is contained in:
2024-04-29 21:29:05 +02:00
parent 2abed91918
commit 727b083e52
7 changed files with 45 additions and 15 deletions

View File

@@ -4,13 +4,13 @@ import (
"errors"
"log"
pkgwatcher "gitea.urkob.com/urko/git-webhook-ci/pkg/watcher"
"gitea.urkob.com/urko/git-webhook-ci/pkg"
"github.com/fsnotify/fsnotify"
)
type watcher struct {
fswatcher *fsnotify.Watcher
deploy pkgwatcher.DeployFunc
deploy pkg.DeployFunc
}
type notifier struct{}
@@ -28,7 +28,7 @@ var (
errErrorsClosedChan = errors.New("errors is closed")
)
func NewWatcher(notifier pkgwatcher.NotifyIface, deploy pkgwatcher.DeployFunc) *watcher {
func NewWatcher(notifier pkg.NotifyIface, deploy pkg.DeployFunc) *watcher {
wt, err := notifier.NewWatcher()
if err != nil {
log.Printf("fsnotify.NewWatcher: %s\n", err)