From 68e3e2eb5c6eedb44cfec94d9c803176d3fee41e Mon Sep 17 00:00:00 2001 From: Davanum Srinivas Date: Fri, 14 Jun 2019 11:14:12 -0400 Subject: [PATCH] updating github.com/mistifyio/go-zfs to v2.1.1+incompatible --- go.mod | 4 ++-- go.sum | 4 ++-- vendor/github.com/mistifyio/go-zfs/BUILD | 1 - vendor/github.com/mistifyio/go-zfs/utils.go | 13 +++++-------- vendor/github.com/mistifyio/go-zfs/zfs.go | 12 ++---------- vendor/modules.txt | 2 +- 6 files changed, 12 insertions(+), 24 deletions(-) diff --git a/go.mod b/go.mod index 487042b9d70..ccb6e7d38f2 100644 --- a/go.mod +++ b/go.mod @@ -101,7 +101,7 @@ require ( github.com/mholt/caddy v1.0.0 github.com/miekg/dns v1.1.3 github.com/mindprince/gonvml v0.0.0-20171110221305-fee913ce8fb2 // indirect - github.com/mistifyio/go-zfs v0.0.0-20151009155749-1b4ae6fb4e77 // indirect + github.com/mistifyio/go-zfs v2.1.1+incompatible // indirect github.com/mitchellh/go-wordwrap v0.0.0-20150314170334-ad45545899c7 github.com/mitchellh/mapstructure v1.1.2 github.com/mohae/deepcopy v0.0.0-20170603005431-491d3605edfb // indirect @@ -345,7 +345,7 @@ replace ( github.com/mholt/certmagic => github.com/mholt/certmagic v0.5.0 github.com/miekg/dns => github.com/miekg/dns v0.0.0-20160614162101-5d001d020961 github.com/mindprince/gonvml => github.com/mindprince/gonvml v0.0.0-20171110221305-fee913ce8fb2 - github.com/mistifyio/go-zfs => github.com/mistifyio/go-zfs v0.0.0-20151009155749-1b4ae6fb4e77 + github.com/mistifyio/go-zfs => github.com/mistifyio/go-zfs v2.1.1+incompatible github.com/mitchellh/go-wordwrap => github.com/mitchellh/go-wordwrap v0.0.0-20150314170334-ad45545899c7 github.com/mitchellh/mapstructure => github.com/mitchellh/mapstructure v1.1.2 github.com/modern-go/concurrent => github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd diff --git a/go.sum b/go.sum index aa3c778912d..8b7c6afb5b4 100644 --- a/go.sum +++ b/go.sum @@ -283,8 +283,8 @@ github.com/miekg/dns v0.0.0-20160614162101-5d001d020961 h1:vX2vkMipgQZ8gfmAsFeZd github.com/miekg/dns v0.0.0-20160614162101-5d001d020961/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= github.com/mindprince/gonvml v0.0.0-20171110221305-fee913ce8fb2 h1:v3dy+FJr7gS7nLgYG7YjX/pmUWuFdudcpnoRNHt2heo= github.com/mindprince/gonvml v0.0.0-20171110221305-fee913ce8fb2/go.mod h1:2eu9pRWp8mo84xCg6KswZ+USQHjwgRhNp06sozOdsTY= -github.com/mistifyio/go-zfs v0.0.0-20151009155749-1b4ae6fb4e77 h1:FGBFB7BrG/ERBtzqLKd3JoDHkVSGHX7GXaWZyG1RLno= -github.com/mistifyio/go-zfs v0.0.0-20151009155749-1b4ae6fb4e77/go.mod h1:8AuVvqP/mXw1px98n46wfvcGfQ4ci2FwoAjKYxuo3Z4= +github.com/mistifyio/go-zfs v2.1.1+incompatible h1:gAMO1HM9xBRONLHHYnu5iFsOJUiJdNZo6oqSENd4eW8= +github.com/mistifyio/go-zfs v2.1.1+incompatible/go.mod h1:8AuVvqP/mXw1px98n46wfvcGfQ4ci2FwoAjKYxuo3Z4= github.com/mitchellh/go-wordwrap v0.0.0-20150314170334-ad45545899c7 h1:DpOJ2HYzCv8LZP15IdmG+YdwD2luVPHITV96TkirNBM= github.com/mitchellh/go-wordwrap v0.0.0-20150314170334-ad45545899c7/go.mod h1:ZXFpozHsX6DPmq2I0TCekCxypsnAUbP2oI0UX1GXzOo= github.com/mitchellh/mapstructure v1.1.2 h1:fmNYVwqnSfB9mZU6OS2O6GsXM+wcskZDuKQzvN1EDeE= diff --git a/vendor/github.com/mistifyio/go-zfs/BUILD b/vendor/github.com/mistifyio/go-zfs/BUILD index 92486736757..3c54d6601b9 100644 --- a/vendor/github.com/mistifyio/go-zfs/BUILD +++ b/vendor/github.com/mistifyio/go-zfs/BUILD @@ -11,7 +11,6 @@ go_library( importmap = "k8s.io/kubernetes/vendor/github.com/mistifyio/go-zfs", importpath = "github.com/mistifyio/go-zfs", visibility = ["//visibility:public"], - deps = ["//vendor/github.com/pborman/uuid:go_default_library"], ) filegroup( diff --git a/vendor/github.com/mistifyio/go-zfs/utils.go b/vendor/github.com/mistifyio/go-zfs/utils.go index 404ab2b5f9a..d5b73534940 100644 --- a/vendor/github.com/mistifyio/go-zfs/utils.go +++ b/vendor/github.com/mistifyio/go-zfs/utils.go @@ -8,8 +8,6 @@ import ( "regexp" "strconv" "strings" - - "github.com/pborman/uuid" ) type command struct { @@ -36,17 +34,16 @@ func (c *command) Run(arg ...string) ([][]string, error) { } cmd.Stderr = &stderr - id := uuid.New() - joinedArgs := strings.Join(cmd.Args, " ") - - logger.Log([]string{"ID:" + id, "START", joinedArgs}) + debug := strings.Join([]string{cmd.Path, strings.Join(cmd.Args, " ")}, " ") + if logger != nil { + logger.Log(cmd.Args) + } err := cmd.Run() - logger.Log([]string{"ID:" + id, "FINISH"}) if err != nil { return nil, &Error{ Err: err, - Debug: strings.Join([]string{cmd.Path, joinedArgs}, " "), + Debug: debug, Stderr: stderr.String(), } } diff --git a/vendor/github.com/mistifyio/go-zfs/zfs.go b/vendor/github.com/mistifyio/go-zfs/zfs.go index 3d0dd66a74f..a1d740e07e5 100644 --- a/vendor/github.com/mistifyio/go-zfs/zfs.go +++ b/vendor/github.com/mistifyio/go-zfs/zfs.go @@ -92,20 +92,12 @@ type Logger interface { Log(cmd []string) } -type defaultLogger struct{} - -func (*defaultLogger) Log(cmd []string) { - return -} - -var logger Logger = &defaultLogger{} +var logger Logger // SetLogger set a log handler to log all commands including arguments before // they are executed func SetLogger(l Logger) { - if l != nil { - logger = l - } + logger = l } // zfs is a helper function to wrap typical calls to zfs. diff --git a/vendor/modules.txt b/vendor/modules.txt index 75ed49a2d50..9e60e08fea2 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -599,7 +599,7 @@ github.com/mholt/caddy/telemetry github.com/miekg/dns # github.com/mindprince/gonvml v0.0.0-20171110221305-fee913ce8fb2 => github.com/mindprince/gonvml v0.0.0-20171110221305-fee913ce8fb2 github.com/mindprince/gonvml -# github.com/mistifyio/go-zfs v0.0.0-20151009155749-1b4ae6fb4e77 => github.com/mistifyio/go-zfs v0.0.0-20151009155749-1b4ae6fb4e77 +# github.com/mistifyio/go-zfs v2.1.1+incompatible => github.com/mistifyio/go-zfs v2.1.1+incompatible github.com/mistifyio/go-zfs # github.com/mitchellh/go-wordwrap v0.0.0-20150314170334-ad45545899c7 => github.com/mitchellh/go-wordwrap v0.0.0-20150314170334-ad45545899c7 github.com/mitchellh/go-wordwrap