From ab683a381882b62ca5b6007ecef044beb64af961 Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Thu, 27 Aug 2026 01:41:08 +0200 Subject: [PATCH] add go.mod We delayed adding a go.mod and to stick with vendor.mod in case we wanted to transfer this repository to the moby org. However, renaming / moving a module will always be impactful, and there's no "clean" way to do a move; if the old location didn't have a `go.mod`, no naming is enforced, so a reference could be used either as "old module name" or "new module name". If a `go.mod` was present before, and after the rename, then go tools can still handle it incorrectly; it resolves the reference (git sha or tag) _BEFORE_ checking if the module name matches what's defined in `go.mod` (if present). The only alternative is to create a "blessed" hard-fork, and archive the old repository (marking it as deprecated in its `go.mod`) to steer users to the new module name. Either approach won't see downsides to having a `go.mod` present, and in fact for the "blessed hard fork", is even preferable, so let's add one. Signed-off-by: Sebastiaan van Stijn --- .github/workflows/ci.yml | 12 ------------ .github/workflows/codeql.yml | 4 ---- vendor.mod => go.mod | 0 vendor.sum => go.sum | 0 4 files changed, 16 deletions(-) rename vendor.mod => go.mod (100%) rename vendor.sum => go.sum (100%) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 782ba7d..e9dd324 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -30,10 +30,6 @@ jobs: steps: - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - - name: Create go.mod - run: | - ln -s vendor.mod go.mod - ln -s vendor.sum go.sum - uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0 with: go-version: "oldstable" @@ -59,10 +55,6 @@ jobs: - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: persist-credentials: false - - name: Create go.mod - run: | - ln -s vendor.mod go.mod - ln -s vendor.sum go.sum - name: Set up Go uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0 with: @@ -82,10 +74,6 @@ jobs: steps: - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - - name: Create go.mod - run: | - ln -s vendor.mod go.mod - ln -s vendor.sum go.sum - name: Set up Go uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0 with: diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 4395b0d..08b293d 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -41,10 +41,6 @@ jobs: steps: - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - - name: Create go.mod - run: | - ln -s vendor.mod go.mod - ln -s vendor.sum go.sum - uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0 with: go-version: "stable" diff --git a/vendor.mod b/go.mod similarity index 100% rename from vendor.mod rename to go.mod diff --git a/vendor.sum b/go.sum similarity index 100% rename from vendor.sum rename to go.sum