From 68915668c7e4c2552337740bd5467afb5a176ce7 Mon Sep 17 00:00:00 2001 From: Lucas Bremgartner Date: Mon, 22 Mar 2021 21:38:16 +0100 Subject: [PATCH] Address review feedback --- Makefile | 2 +- internal/daemon/logstashconfig/file.go | 7 +------ internal/daemon/pipeline/pipeline.go | 4 ---- 3 files changed, 2 insertions(+), 11 deletions(-) diff --git a/Makefile b/Makefile index d9523a4..14e8ecc 100644 --- a/Makefile +++ b/Makefile @@ -84,7 +84,7 @@ $(PROGRAM)$(EXEC_SUFFIX): gogenerate .FORCE $(GOVVV) govvv build -o $@ .PHONY: gogenerate -generate: $(MOQ) +gogenerate: $(MOQ) go generate ./... .PHONY: check diff --git a/internal/daemon/logstashconfig/file.go b/internal/daemon/logstashconfig/file.go index 69eaccb..3fb7120 100644 --- a/internal/daemon/logstashconfig/file.go +++ b/internal/daemon/logstashconfig/file.go @@ -28,12 +28,7 @@ func (f File) Save(targetDir string) error { return err } - err = ioutil.WriteFile(path.Join(targetDir, f.Name), f.Body, 0600) - if err != nil { - return err - } - - return nil + return ioutil.WriteFile(path.Join(targetDir, f.Name), f.Body, 0600) } func (f *File) parse() error { diff --git a/internal/daemon/pipeline/pipeline.go b/internal/daemon/pipeline/pipeline.go index 6620308..163f5a6 100644 --- a/internal/daemon/pipeline/pipeline.go +++ b/internal/daemon/pipeline/pipeline.go @@ -87,10 +87,6 @@ func (a Archive) Validate() error { return nil } -// func (a Archive) walk() { - -// } - func (a Archive) Zip() ([]byte, error) { buf := new(bytes.Buffer) w := zip.NewWriter(buf)