updating github.com/mistifyio/go-zfs to v2.1.1+incompatible
This commit is contained in:
1
vendor/github.com/mistifyio/go-zfs/BUILD
generated
vendored
1
vendor/github.com/mistifyio/go-zfs/BUILD
generated
vendored
@@ -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(
|
||||
|
13
vendor/github.com/mistifyio/go-zfs/utils.go
generated
vendored
13
vendor/github.com/mistifyio/go-zfs/utils.go
generated
vendored
@@ -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(),
|
||||
}
|
||||
}
|
||||
|
12
vendor/github.com/mistifyio/go-zfs/zfs.go
generated
vendored
12
vendor/github.com/mistifyio/go-zfs/zfs.go
generated
vendored
@@ -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.
|
||||
|
Reference in New Issue
Block a user