From 5941507e2647b1a8107778261de8f87cdd0a24f4 Mon Sep 17 00:00:00 2001 From: Michael Bahr Date: Thu, 11 Jun 2026 13:59:17 +0000 Subject: [PATCH] Use errors.Is/errors.As instead of == comparisons against errors --- main.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/main.go b/main.go index 46acd49..99a6ff7 100644 --- a/main.go +++ b/main.go @@ -4,6 +4,7 @@ import ( "bufio" "bytes" "encoding/json" + "errors" "flag" "fmt" "io" @@ -485,7 +486,7 @@ func subscribers(fs FS, path string, notifyFilename string) ([]string, error) { rulefile, err := fs.Open(rulefilepath) if err != nil { - if err == os.ErrNotExist { + if errors.Is(err, os.ErrNotExist) { continue } return nil, err