func (cfg *dockerBuildCfg) client() (*goDocker.Client, error) { if cfg.dockerClient == nil { var err error cfg.dockerClient, err = util.DockerClient() if err != nil { return nil, errors.Trace(err) } } return cfg.dockerClient, nil }
func (d *Docker) getDockerClient() (*goDocker.Client, error) { if d.dockerClient == nil { dClient, err := util.DockerClient() if err != nil { return nil, errors.Trace(err) } d.dockerClient = dClient } return d.dockerClient, nil }