mirror of https://github.com/docker/compose.git
Add "goimports"
Signed-off-by: Ulysses Souza <ulyssessouza@gmail.com>
This commit is contained in:
parent
933bed5f5d
commit
33c45a0a62
|
@ -11,6 +11,7 @@ RUN apt-get update && apt-get install --no-install-recommends -y \
|
||||||
protobuf-compiler \
|
protobuf-compiler \
|
||||||
libprotobuf-dev
|
libprotobuf-dev
|
||||||
RUN go get github.com/golang/protobuf/protoc-gen-go && \
|
RUN go get github.com/golang/protobuf/protoc-gen-go && \
|
||||||
|
go get golang.org/x/tools/cmd/goimports && \
|
||||||
go get gotest.tools/gotestsum
|
go get gotest.tools/gotestsum
|
||||||
WORKDIR ${PWD}
|
WORKDIR ${PWD}
|
||||||
ADD go.* ${PWD}
|
ADD go.* ${PWD}
|
||||||
|
@ -34,10 +35,7 @@ RUN --mount=type=cache,target=/root/.cache/go-build \
|
||||||
make xbins
|
make xbins
|
||||||
|
|
||||||
FROM scratch AS protos
|
FROM scratch AS protos
|
||||||
COPY --from=make-protos /go/src/github.com/docker/api/backend/v1/*.pb.go ./backend/v1/
|
COPY --from=make-protos /go/src/github.com/docker/api .
|
||||||
COPY --from=make-protos /go/src/github.com/docker/api/compose/v1/*.pb.go ./compose/v1/
|
|
||||||
COPY --from=make-protos /go/src/github.com/docker/api/containers/v1/*.pb.go ./containers/v1/
|
|
||||||
COPY --from=make-protos /go/src/github.com/docker/api/cli/v1/*.pb.go ./cli/v1/
|
|
||||||
|
|
||||||
FROM scratch AS bins
|
FROM scratch AS bins
|
||||||
COPY --from=make-bins /go/src/github.com/docker/api/bin/* .
|
COPY --from=make-bins /go/src/github.com/docker/api/bin/* .
|
||||||
|
|
1
Makefile
1
Makefile
|
@ -38,6 +38,7 @@ xbins: xcli xexample
|
||||||
|
|
||||||
protos:
|
protos:
|
||||||
@protoc -I. --go_out=plugins=grpc,paths=source_relative:. ${PROTOS}
|
@protoc -I. --go_out=plugins=grpc,paths=source_relative:. ${PROTOS}
|
||||||
|
@goimports -w -local github.com/docker/api .
|
||||||
|
|
||||||
cli: protos
|
cli: protos
|
||||||
GOOS=${GOOS} GOARCH=${GOARCH} go build -v -o bin/docker ./cli
|
GOOS=${GOOS} GOARCH=${GOARCH} go build -v -o bin/docker ./cli
|
||||||
|
|
|
@ -34,14 +34,15 @@ package v1
|
||||||
|
|
||||||
import (
|
import (
|
||||||
context "context"
|
context "context"
|
||||||
|
reflect "reflect"
|
||||||
|
sync "sync"
|
||||||
|
|
||||||
proto "github.com/golang/protobuf/proto"
|
proto "github.com/golang/protobuf/proto"
|
||||||
grpc "google.golang.org/grpc"
|
grpc "google.golang.org/grpc"
|
||||||
codes "google.golang.org/grpc/codes"
|
codes "google.golang.org/grpc/codes"
|
||||||
status "google.golang.org/grpc/status"
|
status "google.golang.org/grpc/status"
|
||||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||||
reflect "reflect"
|
|
||||||
sync "sync"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
|
|
@ -33,8 +33,9 @@ import (
|
||||||
"os"
|
"os"
|
||||||
"text/tabwriter"
|
"text/tabwriter"
|
||||||
|
|
||||||
"github.com/docker/api/context/store"
|
|
||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
|
|
||||||
|
"github.com/docker/api/context/store"
|
||||||
)
|
)
|
||||||
|
|
||||||
type CliContext struct {
|
type CliContext struct {
|
||||||
|
|
|
@ -5,9 +5,10 @@ import (
|
||||||
"os"
|
"os"
|
||||||
"text/tabwriter"
|
"text/tabwriter"
|
||||||
|
|
||||||
"github.com/docker/api/client"
|
|
||||||
"github.com/pkg/errors"
|
"github.com/pkg/errors"
|
||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
|
|
||||||
|
"github.com/docker/api/client"
|
||||||
)
|
)
|
||||||
|
|
||||||
var PsCommand = cobra.Command{
|
var PsCommand = cobra.Command{
|
||||||
|
|
|
@ -4,13 +4,14 @@ import (
|
||||||
"context"
|
"context"
|
||||||
"net"
|
"net"
|
||||||
|
|
||||||
|
"github.com/pkg/errors"
|
||||||
|
"github.com/sirupsen/logrus"
|
||||||
|
|
||||||
cliv1 "github.com/docker/api/cli/v1"
|
cliv1 "github.com/docker/api/cli/v1"
|
||||||
containersv1 "github.com/docker/api/containers/v1"
|
containersv1 "github.com/docker/api/containers/v1"
|
||||||
"github.com/docker/api/context/store"
|
"github.com/docker/api/context/store"
|
||||||
"github.com/docker/api/server"
|
"github.com/docker/api/server"
|
||||||
"github.com/docker/api/server/proxy"
|
"github.com/docker/api/server/proxy"
|
||||||
"github.com/pkg/errors"
|
|
||||||
"github.com/sirupsen/logrus"
|
|
||||||
|
|
||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
)
|
)
|
||||||
|
|
|
@ -40,12 +40,13 @@ import (
|
||||||
_ "github.com/docker/api/azure"
|
_ "github.com/docker/api/azure"
|
||||||
_ "github.com/docker/api/example"
|
_ "github.com/docker/api/example"
|
||||||
|
|
||||||
|
"github.com/sirupsen/logrus"
|
||||||
|
"github.com/spf13/cobra"
|
||||||
|
|
||||||
"github.com/docker/api/cli/cmd"
|
"github.com/docker/api/cli/cmd"
|
||||||
apicontext "github.com/docker/api/context"
|
apicontext "github.com/docker/api/context"
|
||||||
"github.com/docker/api/context/store"
|
"github.com/docker/api/context/store"
|
||||||
"github.com/docker/api/util"
|
"github.com/docker/api/util"
|
||||||
"github.com/sirupsen/logrus"
|
|
||||||
"github.com/spf13/cobra"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
type mainOpts struct {
|
type mainOpts struct {
|
||||||
|
|
|
@ -34,14 +34,15 @@ package v1
|
||||||
|
|
||||||
import (
|
import (
|
||||||
context "context"
|
context "context"
|
||||||
|
reflect "reflect"
|
||||||
|
sync "sync"
|
||||||
|
|
||||||
proto "github.com/golang/protobuf/proto"
|
proto "github.com/golang/protobuf/proto"
|
||||||
grpc "google.golang.org/grpc"
|
grpc "google.golang.org/grpc"
|
||||||
codes "google.golang.org/grpc/codes"
|
codes "google.golang.org/grpc/codes"
|
||||||
status "google.golang.org/grpc/status"
|
status "google.golang.org/grpc/status"
|
||||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||||
reflect "reflect"
|
|
||||||
sync "sync"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
|
|
@ -34,14 +34,15 @@ package v1
|
||||||
|
|
||||||
import (
|
import (
|
||||||
context "context"
|
context "context"
|
||||||
|
reflect "reflect"
|
||||||
|
sync "sync"
|
||||||
|
|
||||||
proto "github.com/golang/protobuf/proto"
|
proto "github.com/golang/protobuf/proto"
|
||||||
grpc "google.golang.org/grpc"
|
grpc "google.golang.org/grpc"
|
||||||
codes "google.golang.org/grpc/codes"
|
codes "google.golang.org/grpc/codes"
|
||||||
status "google.golang.org/grpc/status"
|
status "google.golang.org/grpc/status"
|
||||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||||
reflect "reflect"
|
|
||||||
sync "sync"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
|
|
@ -34,14 +34,15 @@ package v1
|
||||||
|
|
||||||
import (
|
import (
|
||||||
context "context"
|
context "context"
|
||||||
|
reflect "reflect"
|
||||||
|
sync "sync"
|
||||||
|
|
||||||
proto "github.com/golang/protobuf/proto"
|
proto "github.com/golang/protobuf/proto"
|
||||||
grpc "google.golang.org/grpc"
|
grpc "google.golang.org/grpc"
|
||||||
codes "google.golang.org/grpc/codes"
|
codes "google.golang.org/grpc/codes"
|
||||||
status "google.golang.org/grpc/status"
|
status "google.golang.org/grpc/status"
|
||||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||||
reflect "reflect"
|
|
||||||
sync "sync"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
|
|
@ -31,15 +31,16 @@ import (
|
||||||
"context"
|
"context"
|
||||||
"errors"
|
"errors"
|
||||||
|
|
||||||
"github.com/docker/api/client"
|
|
||||||
apicontext "github.com/docker/api/context"
|
|
||||||
"github.com/docker/api/context/store"
|
|
||||||
"github.com/docker/api/server/proxy"
|
|
||||||
grpc_prometheus "github.com/grpc-ecosystem/go-grpc-prometheus"
|
grpc_prometheus "github.com/grpc-ecosystem/go-grpc-prometheus"
|
||||||
"google.golang.org/grpc"
|
"google.golang.org/grpc"
|
||||||
"google.golang.org/grpc/health"
|
"google.golang.org/grpc/health"
|
||||||
"google.golang.org/grpc/health/grpc_health_v1"
|
"google.golang.org/grpc/health/grpc_health_v1"
|
||||||
"google.golang.org/grpc/metadata"
|
"google.golang.org/grpc/metadata"
|
||||||
|
|
||||||
|
"github.com/docker/api/client"
|
||||||
|
apicontext "github.com/docker/api/context"
|
||||||
|
"github.com/docker/api/context/store"
|
||||||
|
"github.com/docker/api/server/proxy"
|
||||||
)
|
)
|
||||||
|
|
||||||
// New returns a new GRPC server.
|
// New returns a new GRPC server.
|
||||||
|
|
Loading…
Reference in New Issue