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
37
vendor/github.com/docker/libcompose/yaml/external.go
generated
vendored
Normal file
37
vendor/github.com/docker/libcompose/yaml/external.go
generated
vendored
Normal file
|
@ -0,0 +1,37 @@
|
|||
package yaml
|
||||
|
||||
// External represents an external network entry in compose file.
|
||||
// It can be a boolean (true|false) or have a name
|
||||
type External struct {
|
||||
External bool
|
||||
Name string
|
||||
}
|
||||
|
||||
// MarshalYAML implements the Marshaller interface.
|
||||
func (n External) MarshalYAML() (interface{}, error) {
|
||||
if n.Name == "" {
|
||||
return n.External, nil
|
||||
}
|
||||
return map[string]interface{}{
|
||||
"name": n.Name,
|
||||
}, nil
|
||||
}
|
||||
|
||||
// UnmarshalYAML implements the Unmarshaller interface.
|
||||
func (n *External) UnmarshalYAML(unmarshal func(interface{}) error) error {
|
||||
if err := unmarshal(&n.External); err == nil {
|
||||
return nil
|
||||
}
|
||||
var dummyExternal struct {
|
||||
Name string
|
||||
}
|
||||
|
||||
err := unmarshal(&dummyExternal)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
n.Name = dummyExternal.Name
|
||||
n.External = true
|
||||
|
||||
return nil
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue