docker / docker/cli

cli-plugins/examples/helloworld/main.go cannot build

Open
#5,956 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

kind/bug status/0-triage
Dominant language
Go
Stars
6.1k
Forks
2.2k
Avg merge
1d 15h
Merged PRs (30d)
43

Description

Description
$ go build -v -o helloworld main.go 
github.com/docker/docker/api/types/swarm/runtime
# github.com/docker/docker/api/types/swarm/runtime
/root/go/pkg/mod/github.com/docker/docker@v28.0.2+incompatible/api/types/swarm/runtime/plugin.pb.go:23:17: undefined: proto.GoGoProtoPackageIsVersion3
/root/go/pkg/mod/github.com/docker/docker@v28.0.2+incompatible/api/types/swarm/runtime/plugin.pb.go:66:38: undefined: proto.InternalMessageInfo
/root/go/pkg/mod/github.com/docker/docker@v28.0.2+incompatible/api/types/swarm/runtime/plugin.pb.go:142:43: undefined: proto.InternalMessageInfo
Reproduce
mkdir -p cli-test
cd cli-test
wget https://raw.githubusercontent.com/docker/cli/refs/heads/master/cli-plugins/examples/helloworld/main.go
go mod init test
go mod tidy
go build main.go
Expected behavior

No response

docker version
no
docker info
no
Additional Info

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with cli-plugins/examples/helloworld/main.go and reproduce the failure using the provided go mod init, go mod tidy, and go build commands. Inspect the dependency errors reported from api/types/swarm/runtime/plugin.pb.go; done means the helloworld example builds successfully from the documented reproduction steps.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
build-system, cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.