Skip to content

Conversation

Strum355
Copy link
Member

@Strum355 Strum355 commented Sep 1, 2025

Description

If go.mod file is empty go mod graph would return only one line (containing @go that we filter out), which would cause an exception when trying to determine the root module. Instead we can use go mod edit -json to get the root module from the following output:

{
        "Module": {
                "Path": "github.com/sample/empty-module"
        },
        "Go": "1.24",
        "Require": null,
        "Exclude": null,
        "Replace": null,
        "Retract": null,
        "Tool": null
}

Checklist

  • I have followed this repository's contributing guidelines.
  • I will adhere to the project's code of conduct.

Additional information

Anything else?

@Strum355 Strum355 requested a review from ruromero September 1, 2025 15:19
@Strum355 Strum355 merged commit 5ea1a5e into trustification:main Sep 1, 2025
8 of 43 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants