Skip to content

govulncheck: Accept GOEXPERIMENT#37

Merged
tangrufus merged 2 commits intomainfrom
go-experiment
Mar 24, 2026
Merged

govulncheck: Accept GOEXPERIMENT#37
tangrufus merged 2 commits intomainfrom
go-experiment

Conversation

@tangrufus
Copy link
Member

No description provided.

@tangrufus tangrufus added the enhancement New feature or request label Mar 24, 2026
Copilot AI review requested due to automatic review settings March 24, 2026 05:28
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR extends the reusable Go security/lint workflows to allow callers to pass GOEXPERIMENT, enabling tools like govulncheck (and golangci-lint) to run under specific Go experiment flags.

Changes:

  • Add a go-experiment input to the reusable lint-go workflow and pass it as GOEXPERIMENT to the golangci-lint action step.
  • Add a go-experiment input to the reusable audit-go workflow and set GOEXPERIMENT at the govulncheck job level.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
.github/workflows/lint-go.yml Adds go-experiment input and forwards it to golangci-lint via GOEXPERIMENT.
.github/workflows/audit-go.yml Adds go-experiment input and sets GOEXPERIMENT for the govulncheck job.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

default: go.mod
type: string

go-experiment:
Copy link

Copilot AI Mar 24, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new go-experiment reusable-workflow input is missing a description. Other inputs in this workflow provide descriptions, so adding one will make it clearer to callers what format/values are expected (e.g., comma-separated GOEXPERIMENT flags).

Suggested change
go-experiment:
go-experiment:
description: Comma-separated GOEXPERIMENT flags to set for Go commands.

Copilot uses AI. Check for mistakes.
Comment on lines +11 to +13
go-experiment:
default: ""
type: string
Copy link

Copilot AI Mar 24, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

go-experiment is defined as an input but is only applied to the golangci-lint step. The go-mod-tidy-diff job still runs go mod tidy without GOEXPERIMENT, which can lead to inconsistent results when callers set this input. Consider applying GOEXPERIMENT at the job level (or at least for the go mod tidy step) so all Go invocations in this workflow use the same experiment settings.

Copilot uses AI. Check for mistakes.
on:
workflow_call:
inputs:
go-experiment:
Copy link

Copilot AI Mar 24, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The newly added reusable-workflow input go-experiment has no description. Adding one would help workflow callers understand that this maps to the GOEXPERIMENT environment variable and what values are expected.

Suggested change
go-experiment:
go-experiment:
description: "Optional Go experiment flags passed to the GOEXPERIMENT environment variable (e.g., space-separated experiment names)."

Copilot uses AI. Check for mistakes.
@tangrufus tangrufus merged commit 25f24f7 into main Mar 24, 2026
7 checks passed
@tangrufus tangrufus deleted the go-experiment branch March 24, 2026 05:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Development

Successfully merging this pull request may close these issues.

2 participants