Skip to content
This repository has been archived by the owner on Jun 16, 2021. It is now read-only.

Commit

Permalink
Merge pull request #498 from surajnarwade/fix-logrus
Browse files Browse the repository at this point in the history
Fixed Vendor for `sirupsen/logrus`
  • Loading branch information
Vincent Demeester authored Oct 25, 2017
2 parents b2c0c6e + 6cfd21b commit 57bd716
Show file tree
Hide file tree
Showing 551 changed files with 74,323 additions and 32,082 deletions.
2 changes: 1 addition & 1 deletion cli/app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ import (

"golang.org/x/net/context"

"github.com/Sirupsen/logrus"
"github.com/docker/libcompose/project"
"github.com/docker/libcompose/project/options"
"github.com/docker/libcompose/version"
"github.com/sirupsen/logrus"
"github.com/urfave/cli"
)

Expand Down
2 changes: 1 addition & 1 deletion cli/app/events.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ import (

"golang.org/x/net/context"

"github.com/Sirupsen/logrus"
"github.com/docker/libcompose/project"
"github.com/docker/libcompose/project/events"
"github.com/sirupsen/logrus"
"github.com/urfave/cli"
)

Expand Down
2 changes: 1 addition & 1 deletion cli/app/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import (
"runtime"
"text/template"

"github.com/Sirupsen/logrus"
"github.com/docker/libcompose/version"
"github.com/sirupsen/logrus"
"github.com/urfave/cli"
)

Expand Down
2 changes: 1 addition & 1 deletion cli/docker/app/commands.go
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package app

import (
"github.com/Sirupsen/logrus"
"github.com/docker/libcompose/cli/command"
"github.com/docker/libcompose/docker/client"
"github.com/docker/libcompose/docker/ctx"
"github.com/sirupsen/logrus"
"github.com/urfave/cli"
)

Expand Down
2 changes: 1 addition & 1 deletion config/interpolation.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"fmt"
"strings"

"github.com/Sirupsen/logrus"
"github.com/sirupsen/logrus"
)

var defaultValues = make(map[string]string)
Expand Down
2 changes: 1 addition & 1 deletion config/merge_v1.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import (
"fmt"
"path"

"github.com/Sirupsen/logrus"
"github.com/docker/libcompose/utils"
"github.com/sirupsen/logrus"
)

// MergeServicesV1 merges a v1 compose file into an existing set of service configs
Expand Down
2 changes: 1 addition & 1 deletion config/merge_v2.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import (
"path"
"strings"

"github.com/Sirupsen/logrus"
"github.com/docker/libcompose/utils"
"github.com/sirupsen/logrus"
)

// MergeServicesV2 merges a v2 compose file into an existing set of service configs
Expand Down
2 changes: 1 addition & 1 deletion docker/builder/builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import (
"path/filepath"
"strings"

"github.com/Sirupsen/logrus"
"github.com/docker/cli/cli/command/image/build"
"github.com/docker/docker/api/types"
"github.com/docker/docker/builder/dockerignore"
Expand All @@ -20,6 +19,7 @@ import (
"github.com/docker/docker/pkg/streamformatter"
"github.com/docker/docker/pkg/term"
"github.com/docker/libcompose/logger"
"github.com/sirupsen/logrus"
"golang.org/x/net/context"
)

Expand Down
10 changes: 5 additions & 5 deletions docker/container/container.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,18 @@ import (

"golang.org/x/net/context"

"github.com/Sirupsen/logrus"
"github.com/docker/docker/api/types"
"github.com/docker/docker/api/types/container"
"github.com/docker/docker/api/types/network"
"github.com/docker/docker/client"
"github.com/docker/docker/pkg/promise"
"github.com/docker/docker/pkg/stdcopy"
"github.com/docker/docker/pkg/term"
"github.com/docker/go-connections/nat"
"github.com/docker/libcompose/config"
"github.com/docker/libcompose/labels"
"github.com/docker/libcompose/logger"
"github.com/docker/libcompose/project"
"github.com/sirupsen/logrus"
)

// Container holds information about a docker container and the service it is tied on.
Expand Down Expand Up @@ -215,9 +214,10 @@ func (c *Container) Run(ctx context.Context, configOverride *config.ServiceConfi
}

// holdHijackedConnection (in goroutine)
errCh = promise.Go(func() error {
return holdHijackedConnection(configOverride.Tty, in, out, stderr, resp)
})
errCh = make(chan error, 1)
go func() {
errCh <- holdHijackedConnection(configOverride.Tty, in, out, stderr, resp)
}()

if err := c.client.ContainerStart(ctx, c.container.ID, types.ContainerStartOptions{}); err != nil {
return -1, err
Expand Down
2 changes: 1 addition & 1 deletion docker/container/functions.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ func ListByFilter(ctx context.Context, clientInstance client.ContainerAPIClient,
func Get(ctx context.Context, clientInstance client.ContainerAPIClient, id string) (*types.ContainerJSON, error) {
container, err := clientInstance.ContainerInspect(ctx, id)
if err != nil {
if client.IsErrContainerNotFound(err) {
if client.IsErrNotFound(err) {
return nil, nil
}
return nil, err
Expand Down
4 changes: 2 additions & 2 deletions docker/image/image.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,22 @@ import (
"io"
"os"

"github.com/Sirupsen/logrus"
"github.com/docker/distribution/reference"
"github.com/docker/docker/api/types"
"github.com/docker/docker/client"
"github.com/docker/docker/pkg/jsonmessage"
"github.com/docker/docker/pkg/term"
"github.com/docker/docker/registry"
"github.com/docker/libcompose/docker/auth"
"github.com/sirupsen/logrus"
"golang.org/x/net/context"
)

// Exists return whether or not the service image already exists
func Exists(ctx context.Context, clt client.ImageAPIClient, image string) (bool, error) {
_, err := InspectImage(ctx, clt, image)
if err != nil {
if client.IsErrImageNotFound(err) {
if client.IsErrNotFound(err) {
return false, nil
}
return false, err
Expand Down
8 changes: 5 additions & 3 deletions docker/network/network.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,9 @@ func (n *Network) fullName() string {

// Inspect inspect the current network
func (n *Network) Inspect(ctx context.Context) (types.NetworkResource, error) {
return n.client.NetworkInspect(ctx, n.fullName(), false)
return n.client.NetworkInspect(ctx, n.fullName(), types.NetworkInspectOptions{
Verbose: true,
})
}

// Remove removes the current network (from docker engine)
Expand All @@ -53,13 +55,13 @@ func (n *Network) Remove(ctx context.Context) error {
func (n *Network) EnsureItExists(ctx context.Context) error {
networkResource, err := n.Inspect(ctx)
if n.external {
if client.IsErrNetworkNotFound(err) {
if client.IsErrNotFound(err) {
// FIXME(vdemeester) introduce some libcompose error type
return fmt.Errorf("Network %s declared as external, but could not be found. Please create the network manually using docker network create %s and try again", n.fullName(), n.fullName())
}
return err
}
if err != nil && client.IsErrNetworkNotFound(err) {
if err != nil && client.IsErrNotFound(err) {
return n.create(ctx)
}
if n.driver != "" && networkResource.Driver != n.driver {
Expand Down
2 changes: 1 addition & 1 deletion docker/network/network_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ type networkClient struct {
removeError error
}

func (c *networkClient) NetworkInspect(ctx context.Context, networkID string, verbose bool) (types.NetworkResource, error) {
func (c *networkClient) NetworkInspect(ctx context.Context, networkID string, options types.NetworkInspectOptions) (types.NetworkResource, error) {
if c.inspectError != nil {
return types.NetworkResource{}, c.inspectError
}
Expand Down
2 changes: 1 addition & 1 deletion docker/project.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package docker
import (
"golang.org/x/net/context"

"github.com/Sirupsen/logrus"
"github.com/docker/docker/api/types"
"github.com/docker/docker/api/types/filters"
"github.com/docker/libcompose/config"
Expand All @@ -15,6 +14,7 @@ import (
"github.com/docker/libcompose/docker/volume"
"github.com/docker/libcompose/labels"
"github.com/docker/libcompose/project"
"github.com/sirupsen/logrus"
)

// NewProject creates a Project with the specified context.
Expand Down
2 changes: 1 addition & 1 deletion docker/service/convert.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ import (
"fmt"
"strings"

"github.com/docker/cli/opts"
"github.com/docker/docker/api/types/container"
"github.com/docker/docker/api/types/network"
"github.com/docker/docker/api/types/strslice"
"github.com/docker/docker/runconfig/opts"
"github.com/docker/go-connections/nat"
"github.com/docker/go-units"
"github.com/docker/libcompose/config"
Expand Down
4 changes: 2 additions & 2 deletions docker/service/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import (

"golang.org/x/net/context"

"github.com/Sirupsen/logrus"
"github.com/docker/docker/api/types"
"github.com/docker/docker/api/types/filters"
"github.com/docker/docker/api/types/network"
Expand All @@ -26,6 +25,7 @@ import (
"github.com/docker/libcompose/project/options"
"github.com/docker/libcompose/utils"
"github.com/docker/libcompose/yaml"
"github.com/sirupsen/logrus"
)

// Service is a project.Service implementations.
Expand Down Expand Up @@ -488,7 +488,7 @@ func (s *Service) OutOfSync(ctx context.Context, c *container.Container) (bool,

image, err := image.InspectImage(ctx, s.clientFactory.Create(s), c.ImageConfig())
if err != nil {
if client.IsErrImageNotFound(err) {
if client.IsErrNotFound(err) {
logrus.Debugf("Image %s do not exist, do not know if it's out of sync", c.Image())
return false, nil
}
Expand Down
2 changes: 1 addition & 1 deletion docker/service/service_create.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import (

"golang.org/x/net/context"

"github.com/Sirupsen/logrus"
"github.com/docker/docker/api/types"
containertypes "github.com/docker/docker/api/types/container"
"github.com/docker/docker/api/types/network"
Expand All @@ -17,6 +16,7 @@ import (
"github.com/docker/libcompose/project"
"github.com/docker/libcompose/project/events"
util "github.com/docker/libcompose/utils"
"github.com/sirupsen/logrus"
)

func (s *Service) createContainer(ctx context.Context, namer Namer, oldContainer string, configOverride *config.ServiceConfig, oneOff bool) (*composecontainer.Container, error) {
Expand Down
4 changes: 2 additions & 2 deletions docker/volume/volume.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,13 @@ func (v *Volume) Remove(ctx context.Context) error {
func (v *Volume) EnsureItExists(ctx context.Context) error {
volumeResource, err := v.Inspect(ctx)
if v.external {
if client.IsErrVolumeNotFound(err) {
if client.IsErrNotFound(err) {
// FIXME(shouze) introduce some libcompose error type
return fmt.Errorf("Volume %s declared as external, but could not be found. Please create the volume manually using docker volume create %s and try again", v.name, v.name)
}
return err
}
if err != nil && client.IsErrVolumeNotFound(err) {
if err != nil && client.IsErrNotFound(err) {
return v.create(ctx)
}
if volumeResource.Driver != v.driver {
Expand Down
4 changes: 2 additions & 2 deletions hack/cross-binary
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
#!/bin/bash
#!/usr/bin/env bash
set -e

if [ -z "$1" ]; then
# Remove windows platform because of
# https://github.com/mailgun/log/issues/10
OS_PLATFORM_ARG=(linux windows darwin freebsd)
OS_PLATFORM_ARG=(linux windows darwin)
else
OS_PLATFORM_ARG=($1)
fi
Expand Down
2 changes: 1 addition & 1 deletion integration/common_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ import (

"golang.org/x/net/context"

"github.com/Sirupsen/logrus"
"github.com/docker/docker/api/types"
"github.com/docker/docker/client"
lclient "github.com/docker/libcompose/docker/client"
"github.com/docker/libcompose/docker/container"
"github.com/docker/libcompose/labels"
"github.com/sirupsen/logrus"

. "gopkg.in/check.v1"
)
Expand Down
2 changes: 1 addition & 1 deletion integration/run_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,5 +45,5 @@ func (s *CliSuite) TestRun(c *C) {
lastLine := lines[len(lines)-2 : len(lines)-1][0]

c.Assert(cn.State.Running, Equals, false)
c.Assert(lastLine, Equals, "test\r")
c.Assert(lastLine, Equals, "test")
}
2 changes: 1 addition & 1 deletion lookup/envfile.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package lookup
import (
"strings"

"github.com/docker/docker/runconfig/opts"
"github.com/docker/cli/opts"
"github.com/docker/libcompose/config"
)

Expand Down
2 changes: 1 addition & 1 deletion lookup/file.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"path/filepath"
"strings"

"github.com/Sirupsen/logrus"
"github.com/sirupsen/logrus"
)

// relativePath returns the proper relative path for the given file path. If
Expand Down
2 changes: 1 addition & 1 deletion project/context.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ import (
"regexp"
"strings"

"github.com/Sirupsen/logrus"
"github.com/docker/libcompose/config"
"github.com/docker/libcompose/logger"
"github.com/sirupsen/logrus"
)

var projectRegexp = regexp.MustCompile("[^a-zA-Z0-9_.-]")
Expand Down
2 changes: 1 addition & 1 deletion project/listener.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package project
import (
"bytes"

"github.com/Sirupsen/logrus"
"github.com/docker/libcompose/project/events"
"github.com/sirupsen/logrus"
)

var (
Expand Down
2 changes: 1 addition & 1 deletion project/project.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ import (

"golang.org/x/net/context"

log "github.com/Sirupsen/logrus"
"github.com/docker/libcompose/config"
"github.com/docker/libcompose/logger"
"github.com/docker/libcompose/lookup"
"github.com/docker/libcompose/project/events"
"github.com/docker/libcompose/utils"
"github.com/docker/libcompose/yaml"
log "github.com/sirupsen/logrus"
)

// ComposeVersion is name of docker-compose.yml file syntax supported version
Expand Down
2 changes: 1 addition & 1 deletion project/project_scale.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (

"golang.org/x/net/context"

log "github.com/Sirupsen/logrus"
log "github.com/sirupsen/logrus"
)

// Scale scales the specified services.
Expand Down
2 changes: 1 addition & 1 deletion project/service-wrapper.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package project
import (
"sync"

log "github.com/Sirupsen/logrus"
"github.com/docker/libcompose/project/events"
log "github.com/sirupsen/logrus"
)

type serviceWrapper struct {
Expand Down
2 changes: 1 addition & 1 deletion utils/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"sync"
"time"

"github.com/Sirupsen/logrus"
"github.com/sirupsen/logrus"

"gopkg.in/yaml.v2"
)
Expand Down
Loading

0 comments on commit 57bd716

Please sign in to comment.