Skip to content

Commit efe9bba

Browse files
authored
Update Go to v1.24.0 (#139)
* Update Go to v1.24.0 * Update Go to v1.24.0
1 parent b94e25b commit efe9bba

File tree

10 files changed

+831
-829
lines changed

10 files changed

+831
-829
lines changed

.github/workflows/merge.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
- name: Set up Go
1616
uses: actions/setup-go@v5
1717
with:
18-
go-version: 1.23.6
18+
go-version: 1.24.0
1919

2020
- name: Check out code into the Go module directory
2121
uses: actions/checkout@v4

.github/workflows/pre-main.yml

+6-4
Original file line numberDiff line numberDiff line change
@@ -13,18 +13,20 @@ jobs:
1313
name: Run Tests
1414
runs-on: ubuntu-24.04
1515
steps:
16+
- name: Check out code into the Go module directory
17+
uses: actions/checkout@v4
1618

1719
- name: Set up Go
1820
uses: actions/setup-go@v5
1921
with:
20-
go-version: 1.23.6
21-
22-
- name: Check out code into the Go module directory
23-
uses: actions/checkout@v4
22+
go-version-file: go.mod
2423

2524
- name: Run Tests
2625
run: make generate-golang-schema build tests
2726

27+
- name: Run make vet
28+
run: make vet
29+
2830
- name: Quality Gate - Test coverage shall be above threshold
2931
env:
3032
TESTCOVERAGE_THRESHOLD: 40

.golangci.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ linters:
5858
- dupl
5959
- errcheck
6060
- exhaustive
61-
- exportloopref
61+
- copyloopvar
6262
- funlen
6363
- goconst
6464
- gocritic

README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ At a minimum, the following dependencies must be installed to work with the GoLa
3232

3333
Dependency|Minimum Version
3434
---|---
35-
[GoLang](https://golang.org/dl/)|1.23
35+
[GoLang](https://golang.org/dl/)|1.24
3636
[golangci-lint](https://golangci-lint.run/usage/install/)|1.64
3737

3838
## Modifying the claim schema
@@ -59,7 +59,7 @@ One should take all effort to ensure changes to the schema are backwards compati
5959
change is necessary, please make sure to include that information in the commit message. All breaking schema changes
6060
require a semantic version major version bump upon release.
6161

62-
Due to the fact that [a-h/generate](https://github.com/a-h/generate) generates the GoLang language binding, some
62+
Due to the fact that [sebrandon1/generate](https://github.com/sebrandon1/generate) generates the GoLang language binding, some
6363
generated code is not easily modifiable. The library will occasionally output un-testable code, so 100% unit test is
6464
not a requirement. An example of un-testable code is:
6565

@@ -79,7 +79,7 @@ compile-time optimization.
7979

8080
### Overriding type inferences
8181

82-
[a-h/generate](https://github.com/a-h/generate) is known to output JSON `object` types as GoLang `struct`s. Although
82+
[sebrandon1/generate](https://github.com/sebrandon1/generate) is known to output JSON `object` types as GoLang `struct`s. Although
8383
this is normally desirable, we occasionally wish to allow arbitrary JSON instead. In this case, we have no struct
8484
definition for some facets of our claim, such as "lshw" and "results". This is due to the fact that others define those
8585
JSON structures, and we are not in the business of redefinition. This is a rare case in which we want to allow GoLang

cmd/generate/generate.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ import (
1919
"path"
2020
"time"
2121

22-
"github.com/a-h/generate"
2322
igenerate "github.com/redhat-best-practices-for-k8s/certsuite-claim/internal/generate"
23+
"github.com/sebrandon1/generate"
2424
)
2525

2626
const (
@@ -59,7 +59,7 @@ func prependCustomCodeGenerationMessage(w io.Writer) error {
5959
"//",
6060
"// Code generated by `certsuite-claim/cmd/generate/generate.go` on: " + currentTime.String(),
6161
"//",
62-
"// `https://github.com/a-h/generate` provides a generic set of interfaces to convert JSON schema into",
62+
"// `https://github.com/sebrandon1/generate` provides a generic set of interfaces to convert JSON schema into",
6363
"// workable GoLang struct implementations. However, the code generator is limited and does not allow",
6464
"// type remapping. By default, JSON Schema \"object\" types are remapped to custom struct definitions.",
6565
"// This becomes a problem in our case, as we do not define certain facets such as \"Hosts\" or",

go.mod

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
module github.com/redhat-best-practices-for-k8s/certsuite-claim
22

3-
go 1.23.6
3+
go 1.24.0
44

55
require (
6-
github.com/a-h/generate v0.0.0-20220105161013-96c14dfdfb60
6+
github.com/sebrandon1/generate v0.0.3
77
github.com/stretchr/testify v1.10.0
88
)
99

go.sum

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
github.com/a-h/generate v0.0.0-20220105161013-96c14dfdfb60 h1:/rNdG6EuzjwcR1KRFpF+9qWmWh2xIcz84QOeMGr/2L8=
2-
github.com/a-h/generate v0.0.0-20220105161013-96c14dfdfb60/go.mod h1:traiLYQ0YD7qUMCdjo6/jSaJRPHXniX4HVs+PhEhYpc=
31
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
42
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
53
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
64
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
5+
github.com/sebrandon1/generate v0.0.3 h1:Kj9losno2MitIWKJWHM4wM/3+fmO77YkSQqOD23nKK8=
6+
github.com/sebrandon1/generate v0.0.3/go.mod h1:E6qsp1leXoeFhL0cKNen0pErx3kTsuuaE3uL3XLajSk=
77
github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA=
88
github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
99
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=

internal/generate/doc.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@
1212

1313
/*
1414
Package generate is responsible for generating GoLang representations of the redhat-best-practices-for-k8s claim defined by
15-
`claim-schema.json`. A modified version of `https://github.com/a-h/generate` is utilized to emit GoLang structs
15+
`claim-schema.json`. A modified version of `https://github.com/sebrandon1/generate` is utilized to emit GoLang structs
1616
and their corresponding `MarshallJSON` and `UnmarshallJSON` interface implementations. A modified version was
17-
utilized since the original version (`https://github.com/a-h/generate`) blindly remaps JSON "object" types to GoLang
17+
utilized since the original version (`https://github.com/sebrandon1/generate`) blindly remaps JSON "object" types to GoLang
1818
structs. In this case, we have no struct definition for some facets of our claim, such as "LshwOutput" and
1919
"JunitResults". This is due to the fact that others define those JSON structures, and we are not in the business of
2020
redefinition. This is a rare case in which we want to allow GoLang to represent arbitrary JSON data. If deeper

internal/generate/generate.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import (
1818
"os"
1919
"regexp"
2020

21-
"github.com/a-h/generate"
21+
"github.com/sebrandon1/generate"
2222
)
2323

2424
const (

0 commit comments

Comments
 (0)