Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
6 changes: 0 additions & 6 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,7 @@
/cli/winresources/versioninfo.json
/cli/winresources/*.syso
/man/man*/
/man/vendor/
/man/go.sum
/docs/yaml/
/docs/vendor/
/docs/go.sum
profile.out

# top-level go.mod is not meant to be checked in
/go.mod
/go.sum
2 changes: 0 additions & 2 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
* text=auto

Dockerfile* linguist-language=Dockerfile
vendor.mod linguist-language=Go-Module
vendor.sum linguist-language=Go-Checksums

*.go -text diff=golang

Expand Down
10 changes: 0 additions & 10 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,16 +49,6 @@ jobs:
uses: actions/checkout@v4
with:
fetch-depth: 2
# CodeQL 2.16.4's auto-build added support for multi-module repositories,
# and is trying to be smart by searching for modules in every directory,
# including vendor directories. If no module is found, it's creating one
# which is ... not what we want, so let's give it a "go.mod".
# see: https://github.com/docker/cli/pull/4944#issuecomment-2002034698
-
name: Create go.mod
run: |
ln -s vendor.mod go.mod
ln -s vendor.sum go.sum
-
name: Update Go
uses: actions/setup-go@v5
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ jobs:
-
name: Test
run: |
go test -coverprofile=/tmp/coverage.txt $(go list ./... | grep -vE '/vendor/|/e2e/')
go test -coverprofile=/tmp/coverage.txt $(go list ./... | grep -vE '/e2e/')
go tool cover -func=/tmp/coverage.txt
working-directory: ${{ env.GOPATH }}/src/github.com/docker/cli
shell: bash
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/validate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ jobs:
target:
- lint
- shellcheck
- validate-vendor
- update-authors # ensure authors update target runs fine
steps:
-
Expand Down
4 changes: 0 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,3 @@ Thumbs.db
/cli/winresources/versioninfo.json
/cli/winresources/*.syso
profile.out

# top-level go.mod is not meant to be checked in
/go.mod
/go.sum
12 changes: 4 additions & 8 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -140,9 +140,10 @@ why the work is necessary. The explanatory text should be separated by an
empty line.

The commit message *could* have a prefix scoping the change, however this is
not enforced. Common prefixes are `docs: <message>`, `vendor: <message>`,
`chore: <message>` or the package/area related to the change such as `pkg/foo: <message>`
or `telemetry: <message>`.
not enforced. Common prefixes are `docs: <message>` or `chore: <message>` or
the package/area related to the change such as `pkg/foo: <message>` or
`telemetry: <message>`. It's okay to omit redundant or extended prefixes, such
as `pkg` or `internal` if room is needed in the top line of a commit.

A standard commit.
```
Expand All @@ -160,11 +161,6 @@ Calling function A causes the flux capacitor to blow up every time
the sun and the moon align.
```

Updating a specific vendored package.
```
vendor: github.com/docker/docker 6ac445c42bad (master, v28.0-dev)
```

Fixing a broken docs link.
```
docs: fix style/lint issues in deprecated.md
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ ENV GO111MODULE=auto
RUN --mount=type=bind,target=.,rw \
--mount=type=cache,target=/root/.cache \
--mount=type=cache,target=/go/pkg/mod \
gotestsum -- -coverprofile=/tmp/coverage.txt $(go list ./... | grep -vE '/vendor/|/e2e/')
gotestsum -- -coverprofile=/tmp/coverage.txt $(go list ./... | grep -vE '/e2e/')

FROM scratch AS test-coverage
COPY --from=test /tmp/coverage.txt /coverage.txt
Expand Down
16 changes: 2 additions & 14 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,12 @@ test: test-unit ## run tests

.PHONY: test-unit
test-unit: ## run unit tests, to change the output format use: GOTESTSUM_FORMAT=(dots|short|standard-quiet|short-verbose|standard-verbose) make test-unit
gotestsum -- $${TESTDIRS:-$(shell go list ./... | grep -vE '/vendor/|/e2e/')} $(TESTFLAGS)
gotestsum -- $${TESTDIRS:-$(shell go list ./... | grep -vE '/e2e/')} $(TESTFLAGS)

.PHONY: test-coverage
test-coverage: ## run test coverage
mkdir -p $(CURDIR)/build/coverage
gotestsum -- $(shell go list ./... | grep -vE '/vendor/|/e2e/') -coverprofile=$(CURDIR)/build/coverage/coverage.txt
gotestsum -- $(shell go list ./... | grep -vE '/e2e/') -coverprofile=$(CURDIR)/build/coverage/coverage.txt

.PHONY: lint
lint: ## run all the lint tools
Expand Down Expand Up @@ -69,18 +69,6 @@ dynbinary: ## build dynamically linked binary
plugins: ## build example CLI plugins
./scripts/build/plugins

.PHONY: vendor
vendor: ## update vendor with go modules
rm -rf vendor
./scripts/vendor update

.PHONY: validate-vendor
validate-vendor: ## validate vendor
./scripts/vendor validate

.PHONY: mod-outdated
mod-outdated: ## check outdated dependencies
./scripts/vendor outdated

.PHONY: authors
authors: ## generate AUTHORS file from git history
Expand Down
8 changes: 4 additions & 4 deletions cli-plugins/examples/helloworld/main.go
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
package main
package main // import "docker.com/cli/v28/cli-plugins/examples/helloworld"

import (
"context"
"fmt"
"os"

"github.com/docker/cli/cli-plugins/manager"
"github.com/docker/cli/cli-plugins/plugin"
"github.com/docker/cli/cli/command"
"github.com/docker/cli/v28/cli-plugins/manager"
"github.com/docker/cli/v28/cli-plugins/plugin"
"github.com/docker/cli/v28/cli/command"
"github.com/spf13/cobra"
)

Expand Down
2 changes: 1 addition & 1 deletion cli-plugins/hooks/printer.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package hooks
package hooks // import "docker.com/cli/v28/cli-plugins/hooks"

import (
"fmt"
Expand Down
2 changes: 1 addition & 1 deletion cli-plugins/hooks/printer_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package hooks
package hooks // import "docker.com/cli/v28/cli-plugins/hooks"

import (
"bytes"
Expand Down
2 changes: 1 addition & 1 deletion cli-plugins/hooks/template.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package hooks
package hooks // import "docker.com/cli/v28/cli-plugins/hooks"

import (
"bytes"
Expand Down
2 changes: 1 addition & 1 deletion cli-plugins/hooks/template_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package hooks
package hooks // import "docker.com/cli/v28/cli-plugins/hooks"

import (
"testing"
Expand Down
2 changes: 1 addition & 1 deletion cli-plugins/manager/candidate.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package manager
package manager // import "docker.com/cli/v28/cli-plugins/manager"

import "os/exec"

Expand Down
2 changes: 1 addition & 1 deletion cli-plugins/manager/candidate_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package manager
package manager // import "docker.com/cli/v28/cli-plugins/manager"

import (
"fmt"
Expand Down
4 changes: 2 additions & 2 deletions cli-plugins/manager/cobra.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package manager
package manager // import "docker.com/cli/v28/cli-plugins/manager"

import (
"fmt"
Expand All @@ -7,7 +7,7 @@ import (
"strings"
"sync"

"github.com/docker/cli/cli/command"
"github.com/docker/cli/v28/cli/command"
"github.com/spf13/cobra"
"go.opentelemetry.io/otel/attribute"
)
Expand Down
2 changes: 1 addition & 1 deletion cli-plugins/manager/error.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// FIXME(thaJeztah): remove once we are a module; the go:build directive prevents go from downgrading language version to go1.16:
//go:build go1.22

package manager
package manager // import "docker.com/cli/v28/cli-plugins/manager"

import (
"github.com/pkg/errors"
Expand Down
2 changes: 1 addition & 1 deletion cli-plugins/manager/error_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package manager
package manager // import "docker.com/cli/v28/cli-plugins/manager"

import (
"encoding/json"
Expand Down
6 changes: 3 additions & 3 deletions cli-plugins/manager/hooks.go
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
package manager
package manager // import "docker.com/cli/v28/cli-plugins/manager"

import (
"context"
"encoding/json"
"strings"

"github.com/docker/cli/cli-plugins/hooks"
"github.com/docker/cli/cli/command"
"github.com/docker/cli/v28/cli-plugins/hooks"
"github.com/docker/cli/v28/cli/command"
"github.com/sirupsen/logrus"
"github.com/spf13/cobra"
"github.com/spf13/pflag"
Expand Down
2 changes: 1 addition & 1 deletion cli-plugins/manager/hooks_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package manager
package manager // import "docker.com/cli/v28/cli-plugins/manager"

import (
"testing"
Expand Down
8 changes: 4 additions & 4 deletions cli-plugins/manager/manager.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package manager
package manager // import "docker.com/cli/v28/cli-plugins/manager"

import (
"context"
Expand All @@ -9,9 +9,9 @@ import (
"strings"
"sync"

"github.com/docker/cli/cli/command"
"github.com/docker/cli/cli/config"
"github.com/docker/cli/cli/config/configfile"
"github.com/docker/cli/v28/cli/command"
"github.com/docker/cli/v28/cli/config"
"github.com/docker/cli/v28/cli/config/configfile"
"github.com/fvbommel/sortorder"
"github.com/spf13/cobra"
"golang.org/x/sync/errgroup"
Expand Down
8 changes: 4 additions & 4 deletions cli-plugins/manager/manager_test.go
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
package manager
package manager // import "docker.com/cli/v28/cli-plugins/manager"

import (
"strings"
"testing"

"github.com/docker/cli/cli/config"
"github.com/docker/cli/cli/config/configfile"
"github.com/docker/cli/internal/test"
"github.com/docker/cli/v28/cli/config"
"github.com/docker/cli/v28/cli/config/configfile"
"github.com/docker/cli/v28/internal/test"
"github.com/spf13/cobra"
"gotest.tools/v3/assert"
"gotest.tools/v3/fs"
Expand Down
2 changes: 1 addition & 1 deletion cli-plugins/manager/manager_unix.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//go:build !windows

package manager
package manager // import "docker.com/cli/v28/cli-plugins/manager"

// defaultSystemPluginDirs are the platform-specific locations to search
// for plugins in order of preference.
Expand Down
2 changes: 1 addition & 1 deletion cli-plugins/manager/manager_windows.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package manager
package manager // import "docker.com/cli/v28/cli-plugins/manager"

import (
"os"
Expand Down
2 changes: 1 addition & 1 deletion cli-plugins/manager/metadata.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package manager
package manager // import "docker.com/cli/v28/cli-plugins/manager"

const (
// NamePrefix is the prefix required on all plugin binary names
Expand Down
2 changes: 1 addition & 1 deletion cli-plugins/manager/plugin.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package manager
package manager // import "docker.com/cli/v28/cli-plugins/manager"

import (
"context"
Expand Down
2 changes: 1 addition & 1 deletion cli-plugins/manager/suffix_unix.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//go:build !windows

package manager
package manager // import "docker.com/cli/v28/cli-plugins/manager"

func trimExeSuffix(s string) (string, error) {
return s, nil
Expand Down
2 changes: 1 addition & 1 deletion cli-plugins/manager/suffix_windows.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package manager
package manager // import "docker.com/cli/v28/cli-plugins/manager"

import (
"path/filepath"
Expand Down
14 changes: 7 additions & 7 deletions cli-plugins/plugin/plugin.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package plugin
package plugin // import "docker.com/cli/v28/cli-plugins/plugin"

import (
"context"
Expand All @@ -8,12 +8,12 @@ import (
"os"
"sync"

"github.com/docker/cli/cli"
"github.com/docker/cli/cli-plugins/manager"
"github.com/docker/cli/cli-plugins/socket"
"github.com/docker/cli/cli/command"
"github.com/docker/cli/cli/connhelper"
"github.com/docker/cli/cli/debug"
"github.com/docker/cli/v28/cli"
"github.com/docker/cli/v28/cli-plugins/manager"
"github.com/docker/cli/v28/cli-plugins/socket"
"github.com/docker/cli/v28/cli/command"
"github.com/docker/cli/v28/cli/connhelper"
"github.com/docker/cli/v28/cli/debug"
"github.com/docker/docker/client"
"github.com/spf13/cobra"
"go.opentelemetry.io/otel"
Expand Down
2 changes: 1 addition & 1 deletion cli-plugins/socket/socket.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package socket
package socket // import "docker.com/cli/v28/cli-plugins/socket"

import (
"crypto/rand"
Expand Down
2 changes: 1 addition & 1 deletion cli-plugins/socket/socket_abstract.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//go:build windows || linux

package socket
package socket // import "docker.com/cli/v28/cli-plugins/socket"

func socketName(basename string) string {
// Address of an abstract socket -- this socket can be opened by name,
Expand Down
2 changes: 1 addition & 1 deletion cli-plugins/socket/socket_noabstract.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//go:build !windows && !linux

package socket
package socket // import "docker.com/cli/v28/cli-plugins/socket"

import (
"os"
Expand Down
2 changes: 1 addition & 1 deletion cli-plugins/socket/socket_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package socket
package socket // import "docker.com/cli/v28/cli-plugins/socket"

import (
"errors"
Expand Down
8 changes: 4 additions & 4 deletions cli/cobra.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package cli
package cli // import "docker.com/cli/v28/cli"

import (
"fmt"
Expand All @@ -7,9 +7,9 @@ import (
"sort"
"strings"

pluginmanager "github.com/docker/cli/cli-plugins/manager"
"github.com/docker/cli/cli/command"
cliflags "github.com/docker/cli/cli/flags"
pluginmanager "github.com/docker/cli/v28/cli-plugins/manager"
"github.com/docker/cli/v28/cli/command"
cliflags "github.com/docker/cli/v28/cli/flags"
"github.com/docker/docker/pkg/homedir"
"github.com/docker/docker/registry"
"github.com/fvbommel/sortorder"
Expand Down
4 changes: 2 additions & 2 deletions cli/cobra_test.go
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package cli
package cli // import "docker.com/cli/v28/cli"

import (
"testing"

pluginmanager "github.com/docker/cli/cli-plugins/manager"
pluginmanager "github.com/docker/cli/v28/cli-plugins/manager"
"github.com/google/go-cmp/cmp/cmpopts"
"github.com/spf13/cobra"
"gotest.tools/v3/assert"
Expand Down
Loading
Loading