diff --git a/job.go b/job.go index 2e3768e..dde57ce 100644 --- a/job.go +++ b/job.go @@ -3,6 +3,7 @@ package main import ( "archive/zip" "bytes" + "compress/zlib" "encoding/json" "errors" "fmt" @@ -18,7 +19,7 @@ import ( ) func createJob(jobTypeID64 int64, priority int32, userID64 int64, trigger int64, schedule time.Time, payload []byte) (int64, error) { - zb := make(bytes.Buffer) + zb := new(bytes.Buffer) zw := zlib.NewWriter(&zb) zw.Write(payload) zw.Close() diff --git a/obj.go b/obj.go index 311d52c..310df10 100644 --- a/obj.go +++ b/obj.go @@ -1,6 +1,8 @@ package main import ( + "bytes" + "compress/zlib" "encoding/json" "errors" "fmt"