Update traefik dependencies (docker/docker and related) (#1823)
Update traefik dependencies (docker/docker and related) - Update dependencies - Fix compilation problems - Remove vdemeester/docker-events (in docker api now) - Remove `integration/vendor` - Use `testImport` - update some deps. - regenerate the lock from scratch (after a `glide cc`)
This commit is contained in:
parent
7d178f49b4
commit
b7daa2f3a4
1301 changed files with 21476 additions and 150099 deletions
42
vendor/github.com/docker/libcompose/yaml/command.go
generated
vendored
Normal file
42
vendor/github.com/docker/libcompose/yaml/command.go
generated
vendored
Normal file
|
@ -0,0 +1,42 @@
|
|||
package yaml
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
|
||||
"github.com/docker/docker/api/types/strslice"
|
||||
"github.com/flynn/go-shlex"
|
||||
)
|
||||
|
||||
// Command represents a docker command, can be a string or an array of strings.
|
||||
type Command strslice.StrSlice
|
||||
|
||||
// UnmarshalYAML implements the Unmarshaller interface.
|
||||
func (s *Command) UnmarshalYAML(unmarshal func(interface{}) error) error {
|
||||
var stringType string
|
||||
if err := unmarshal(&stringType); err == nil {
|
||||
parts, err := shlex.Split(stringType)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
*s = parts
|
||||
return nil
|
||||
}
|
||||
|
||||
var sliceType []interface{}
|
||||
if err := unmarshal(&sliceType); err == nil {
|
||||
parts, err := toStrings(sliceType)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
*s = parts
|
||||
return nil
|
||||
}
|
||||
|
||||
var interfaceType interface{}
|
||||
if err := unmarshal(&interfaceType); err == nil {
|
||||
fmt.Println(interfaceType)
|
||||
}
|
||||
|
||||
return errors.New("Failed to unmarshal Command")
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue