Skip to content

Commit

Permalink
Merge pull request #2386 from openziti/update-to-go1.23
Browse files Browse the repository at this point in the history
Update to Go 1.23. Fixes #2385
  • Loading branch information
plorenz committed Sep 6, 2024
2 parents a11e8b4 + ca66653 commit 94e2920
Show file tree
Hide file tree
Showing 8 changed files with 22 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/golangci-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
uses: golangci/golangci-lint-action@v6
with:
# Optional: version of golangci-lint to use in form of v1.2 or v1.2.3 or `latest` to use the latest version
version: v1.57.2
version: v1.60.3

# Optional: working directory, useful for monorepos
# working-directory: somedir
Expand Down
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
# Release 1.1.11

# What's New

* This release updates to Go v1.23
* Updates to the latest version of golangci-lint, to allow it to work with the new version of Go
* Linter fixes to address issues caught by updated linter

# Release 1.1.10

## What's New
Expand Down
2 changes: 1 addition & 1 deletion controller/db/posture_check_os.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ func (entity *PostureCheckOperatingSystem) SetValues(ctx *boltz.PersistContext,
if _, found := osMap[string(key)]; !found {
err := bucket.DeleteBucket(key)
if err != nil {
pfxlog.Logger().Errorf(err.Error())
pfxlog.Logger().WithError(err).Errorf("error resetting posture check os values")
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
module github.com/openziti/ziti

go 1.22.0
go 1.23

toolchain go1.22.5
toolchain go1.23.0

require (
github.com/AppsFlyer/go-sundheit v0.6.0
Expand Down
2 changes: 1 addition & 1 deletion router/xgress_edge/dialer.go
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ func (dialer *dialer) Dial(params xgress.DialParams) (xt.PeerData, error) {
log.Info(msg)
conn.close(false, msg)
x.Close()
return nil, fmt.Errorf(msg)
return nil, errors.New(msg)
}
log.Debug("dial success")

Expand Down
2 changes: 1 addition & 1 deletion ziti/cmd/fabric/validate_router_data_model.go
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ func (self *validateRouterDataModelAction) validateRouterDataModel(_ *cobra.Comm

for _, errDetail := range detail.Errors {
outputHeader()
fmt.Printf("\t" + errDetail + "\n")
fmt.Printf("\t%s\n", errDetail)
errCount++
}
expected--
Expand Down
8 changes: 6 additions & 2 deletions ziti/pki/store/local.go
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,9 @@ func (l *Local) Update(caName string, sn *big.Int, st certificate.State) error {
}

matchedSerial := big.NewInt(0)
fmt.Sscanf(matches[4], "%X", matchedSerial)
if _, err = fmt.Sscanf(matches[4], "%X", matchedSerial); err != nil {
return err
}
if matchedSerial.Cmp(sn) == 0 {
if matches[1] == state {
return nil
Expand Down Expand Up @@ -442,7 +444,9 @@ func (l *Local) Revoked(caName string) ([]pkix.RevokedCertificate, error) {
}

sn := big.NewInt(0)
fmt.Sscanf(matches[4], "%X", sn)
if _, err = fmt.Sscanf(matches[4], "%X", sn); err != nil {
return nil, err
}
t, err := time.Parse("060102150405", strings.TrimSuffix(matches[3], "Z"))
if err != nil {
return nil, fmt.Errorf("failed parsing revocation time %v: %v", matches[3], err)
Expand Down
4 changes: 2 additions & 2 deletions zititest/go.mod
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
module github.com/openziti/ziti/zititest

go 1.22.0
go 1.23.1

toolchain go1.22.1
toolchain go1.23.1

replace github.com/openziti/ziti => ../

Expand Down

0 comments on commit 94e2920

Please sign in to comment.