1
0
mirror of https://github.com/rancher/os.git synced 2025-09-28 22:15:10 +00:00

move dependencies to vendor

This commit is contained in:
Ivan Mikushin
2015-11-26 17:37:01 +05:00
parent 63d7de67cd
commit 1d691cd8d6
2232 changed files with 154499 additions and 9037 deletions

51
vendor/github.com/docker/libcompose/docker/project.go generated vendored Normal file
View File

@@ -0,0 +1,51 @@
package docker
import (
"github.com/Sirupsen/logrus"
"github.com/docker/libcompose/lookup"
"github.com/docker/libcompose/project"
)
// NewProject creates a Project with the specified context.
func NewProject(context *Context) (*project.Project, error) {
if context.ConfigLookup == nil {
context.ConfigLookup = &lookup.FileConfigLookup{}
}
if context.EnvironmentLookup == nil {
context.EnvironmentLookup = &lookup.OsEnvLookup{}
}
if context.ServiceFactory == nil {
context.ServiceFactory = &ServiceFactory{
context: context,
}
}
if context.Builder == nil {
context.Builder = NewDaemonBuilder(context)
}
if context.ClientFactory == nil {
factory, err := NewDefaultClientFactory(ClientOpts{})
if err != nil {
return nil, err
}
context.ClientFactory = factory
}
p := project.NewProject(&context.Context)
err := p.Parse()
if err != nil {
return nil, err
}
if err = context.open(); err != nil {
logrus.Errorf("Failed to open project %s: %v", p.Name, err)
return nil, err
}
return p, err
}