From fdcc1bed23310d7ae2c88019c8e740f78c59c5c2 Mon Sep 17 00:00:00 2001 From: Martin Balvers Date: Thu, 10 Mar 2022 09:23:09 +0100 Subject: [PATCH] Use local notifier package instead of outdated github.com/damicon/zfswatcher/notifier --- Makefile | 3 +++ leds.go | 2 +- setup.go | 2 +- util.go | 2 +- webpagehandlers.go | 2 +- webserver.go | 2 +- zfswatcher.go | 2 +- zparse.go | 2 +- 8 files changed, 10 insertions(+), 7 deletions(-) diff --git a/Makefile b/Makefile index c56a4a1..50178de 100644 --- a/Makefile +++ b/Makefile @@ -46,6 +46,9 @@ VERSION = $(shell fgrep VERSION version.go | cut -d\" -f2) all: zfswatcher zfswatcher: +ifeq (,$(wildcard ./go.mod)) + $(GO) mod init zfswatcher +endif $(GO) get -d $(GO) build -o $@ diff --git a/leds.go b/leds.go index d2a75c4..29f6e55 100644 --- a/leds.go +++ b/leds.go @@ -24,7 +24,7 @@ package main import ( "errors" "fmt" - "github.com/damicon/zfswatcher/notifier" + "zfswatcher/notifier" "os" "os/exec" "strings" diff --git a/setup.go b/setup.go index 74d0879..3d74fe0 100644 --- a/setup.go +++ b/setup.go @@ -25,7 +25,7 @@ import ( "gopkg.in/gcfg.v1" "errors" "fmt" - "github.com/damicon/zfswatcher/notifier" + "zfswatcher/notifier" "github.com/ogier/pflag" "os" "strings" diff --git a/util.go b/util.go index 5e8cf4b..1aabd8d 100644 --- a/util.go +++ b/util.go @@ -24,7 +24,7 @@ package main import ( "errors" "fmt" - "github.com/damicon/zfswatcher/notifier" + "zfswatcher/notifier" "io" "os" "os/exec" diff --git a/webpagehandlers.go b/webpagehandlers.go index eef6c98..98ee369 100644 --- a/webpagehandlers.go +++ b/webpagehandlers.go @@ -25,7 +25,7 @@ import ( "fmt" "regexp" auth "github.com/abbot/go-http-auth" - "github.com/damicon/zfswatcher/notifier" + "zfswatcher/notifier" "html/template" "net/http" "sync" diff --git a/webserver.go b/webserver.go index 4558144..0e5f04b 100644 --- a/webserver.go +++ b/webserver.go @@ -24,7 +24,7 @@ package main import ( "fmt" auth "github.com/abbot/go-http-auth" - "github.com/damicon/zfswatcher/notifier" + "zfswatcher/notifier" "html/template" "math/rand" "net/http" diff --git a/zfswatcher.go b/zfswatcher.go index 2b7a346..c15bd80 100644 --- a/zfswatcher.go +++ b/zfswatcher.go @@ -30,7 +30,7 @@ package main import ( "fmt" - "github.com/damicon/zfswatcher/notifier" + "zfswatcher/notifier" "os" "os/signal" "runtime" diff --git a/zparse.go b/zparse.go index 22143ba..5c82820 100644 --- a/zparse.go +++ b/zparse.go @@ -23,7 +23,7 @@ package main import ( "errors" - "github.com/damicon/zfswatcher/notifier" + "zfswatcher/notifier" "io" "runtime" "strings"