mirror of
https://github.com/actions/setup-go.git
synced 2025-12-17 05:02:34 +00:00
feat: auto-detect go.mod when no version inputs specified
- Add unit tests for auto-detection behavior - Implement go.mod auto-detection in resolveVersionInput() - Explicit inputs still take precedence over auto-detection Related issue: #523
This commit is contained in:
parent
c0137caad7
commit
612cee1af9
3 changed files with 32 additions and 0 deletions
3
dist/setup/index.js
vendored
3
dist/setup/index.js
vendored
|
|
@ -94902,6 +94902,9 @@ function resolveVersionInput() {
|
|||
}
|
||||
version = installer.parseGoVersionFile(versionFilePath);
|
||||
}
|
||||
if (!version && fs_1.default.existsSync('go.mod')) {
|
||||
version = installer.parseGoVersionFile('go.mod');
|
||||
}
|
||||
return version;
|
||||
}
|
||||
function setGoToolchain() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue