Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit98efa49

Browse files
committed
Fix Go Version and Code Style
- Downgrade Go version to 1.24 in CI for compatibility.- Correct typos and improve READme check naming.- Align go.mod version with CI for consistency.
1 parent5b6d878 commit98efa49

File tree

4 files changed

+10
-15
lines changed

4 files changed

+10
-15
lines changed

‎.github/workflows/ci.yaml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,8 @@ jobs:
6363
-name:Set up Go
6464
uses:actions/setup-go@v5
6565
with:
66-
go-version:"1.25.0"
67-
-name:ValidateReademde
66+
go-version:"1.24"
67+
-name:ValidateREADME
6868
run:go build ./cmd/readmevalidation && ./readmevalidation
6969
-name:Remove build file artifact
7070
run:rm ./readmevalidation

‎.github/workflows/golangci-lint.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
-uses:actions/checkout@v5
1818
-uses:actions/setup-go@v5
1919
with:
20-
go-version:stable
20+
go-version:"stable"
2121
-name:golangci-lint
2222
uses:golangci/golangci-lint-action@v8
2323
with:

‎cmd/readmevalidation/codermodules.go‎

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -14,21 +14,16 @@ var (
1414
terraformSourceRe=regexp.MustCompile(`^\s*source\s*=\s*"([^"]+)"`)
1515
)
1616

17-
funcnormalizeModuleName(namestring)string {
18-
// Normalize module names by replacing hyphens with underscores for comparison
19-
// since Terraform allows both but directory names typically use hyphens
20-
returnstrings.ReplaceAll(name,"-","_")
21-
}
22-
23-
funcextractNamespaceAndModuleFromPath(filePathstring) (string,string,error) {
17+
funcextractNamespaceAndModuleFromPath(filePathstring) (namespacestring,moduleNamestring,errerror) {
2418
// Expected path format: registry/<namespace>/modules/<module-name>/README.md
2519
parts:=strings.Split(filepath.Clean(filePath),string(filepath.Separator))
2620
iflen(parts)<5||parts[0]!="registry"||parts[2]!="modules"||parts[4]!="README.md" {
27-
return"","",xerrors.Errorf("invalid module path format: %s",filePath)
21+
err=xerrors.Errorf("invalid module path format: %s",filePath)
22+
return
2823
}
29-
namespace:=parts[1]
30-
moduleName:=parts[3]
31-
returnnamespace,moduleName,nil
24+
namespace=parts[1]
25+
moduleName=parts[3]
26+
return
3227
}
3328

3429
funcvalidateModuleSourceURL(bodystring,filePathstring) []error {

‎go.mod‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
modulecoder.com/coder-registry
22

3-
go1.23.2
3+
go1.24
44

55
require (
66
cdr.dev/slogv1.6.1

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp