Replace mattn/go-shellwords with google/shlex
Both libaries provide similar functionality. We're currently using Google Shlex in more places, so prefering that one for now, but we could decide to switch to mattn/go-shellwords in future if that library is considered better (it looks to be more actively maintained, but that may be related to it providing "more features"). Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
@ -17,7 +17,7 @@ import (
|
||||
"github.com/docker/docker/api/types/versions"
|
||||
"github.com/docker/go-connections/nat"
|
||||
units "github.com/docker/go-units"
|
||||
shellwords "github.com/mattn/go-shellwords"
|
||||
"github.com/google/shlex"
|
||||
"github.com/mitchellh/mapstructure"
|
||||
"github.com/pkg/errors"
|
||||
"github.com/sirupsen/logrus"
|
||||
@ -853,7 +853,7 @@ func transformMappingOrList(mappingOrList interface{}, sep string, allowNil bool
|
||||
|
||||
var transformShellCommand TransformerFunc = func(value interface{}) (interface{}, error) {
|
||||
if str, ok := value.(string); ok {
|
||||
return shellwords.Parse(str)
|
||||
return shlex.Split(str)
|
||||
}
|
||||
return value, nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user