diff --git a/fsnotify/filewatcher.go b/fsnotify/filewatcher.go index 9af7f41..7262bb4 100644 --- a/fsnotify/filewatcher.go +++ b/fsnotify/filewatcher.go @@ -11,6 +11,7 @@ import ( rfsnotify "github.com/fsnotify/fsnotify" "github.com/infobloxopen/hotload" + "github.com/pkg/errors" ) func init() { @@ -44,7 +45,7 @@ type pathWatch struct { func readConfigFile(path string) (v []byte, err error) { v, err = ioutil.ReadFile(path) if err != nil { - return + return nil, errors.Wrapf(err, "could not read %v", path) } v = []byte(strings.TrimSpace(string(v))) return diff --git a/go.mod b/go.mod index 47f98c8..bf48ad7 100644 --- a/go.mod +++ b/go.mod @@ -8,6 +8,7 @@ require ( github.com/lib/pq v1.10.8 github.com/onsi/ginkgo v1.16.5 github.com/onsi/gomega v1.27.6 + github.com/pkg/errors v0.9.1 github.com/sirupsen/logrus v1.9.0 ) diff --git a/go.sum b/go.sum index 344c2d4..53e73c1 100644 --- a/go.sum +++ b/go.sum @@ -40,6 +40,8 @@ github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7J github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= github.com/onsi/gomega v1.27.6 h1:ENqfyGeS5AX/rlXDd/ETokDz93u0YufY1Pgxuy/PvWE= github.com/onsi/gomega v1.27.6/go.mod h1:PIQNjfQwkP3aQAH7lf7j87O/5FiNr+ZR8+ipb+qQlhg= +github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= +github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/sirupsen/logrus v1.9.0 h1:trlNQbNUG3OdDrDil03MCb1H2o9nJ1x4/5LYw7byDE0=