Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to go 1.23.x #34

Merged
merged 4 commits into from
Sep 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.22.x'
go-version: '1.23.x'

- name: Build
run: make chronoctl
Expand Down
26 changes: 13 additions & 13 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,19 +73,19 @@ linters-settings:
# minimal occurrences count to trigger, 3 by default
min-occurrences: 3
depguard:
list-type: blacklist
include-go-root: false
packages:
- hash/fnv
- github.com/sirupsen/logrus
- github.com/tj/assert
- github.com/golang/protobuf/jsonpb
packages-with-error-messages:
# specify an error message to output when a blacklisted package is used
hash/fnv: "use github.com/cespare/xxhash/v2"
github.com/sirupsen/logrus: "logging is allowed only by logutils.Log"
github.com/tj/assert: "use github.com/stretchr/testify/assert"
github.com/golang/protobuf/jsonpb: "replace with github.com/gogo/protobuf/jsonpb"
rules:
main:
deny:
- pkg: "hash/fnv"
desc: "use github.com/cespare/xxhash/v2"
- pkg: "github.com/sirupsen/logrus"
desc: "logging is allowed only by logutils.Log"
- pkg: "github.com/tj/assert"
desc: "use github.com/stretchr/testify/assert"
- pkg: "github.com/golang/protobuf/jsonpb"
desc: "replace with github.com/gogo/protobuf/jsonpb"
- pkg: "golang.org/x/net/context"
desc: "replace with context"
misspell:
# Correct spellings using locale preferences for US or UK.
# Default is to use a neutral variety of English.
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ chronoctl:
go-version-check:
# make sure you're running the right version of Go, otherwise builds/codegen/tests
# may have inconsistent results that are hard to debug.
go version | grep go1.22 || (echo "Error: you must be running go1.22.x" && exit 1)
go version | grep go1.23 || (echo "Error: you must be running go1.23.x" && exit 1)

.PHONY: release
release:
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ Chronosphere:

## Building

To build chronoctl, you must have Go 1.22 installed. A download link can be found at
To build chronoctl, you must have Go 1.23 installed. A download link can be found at
[go.dev](https://go.dev/doc/install).

Run `make chronoctl` to build the binary. It will be found under
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/chronosphereio/chronoctl-core

go 1.22
go 1.23

require (
github.com/alecthomas/participle/v2 v2.1.0
Expand Down
4 changes: 2 additions & 2 deletions src/cmd/apply.go
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ func (o *ApplyCommand) Run(stdout io.Writer, stderr io.Writer) error {
if dryRun {
dryRunPrefix = "[dry run] "
}
fmt.Fprintf(stdout, "%sApplying %s ", dryRunPrefix, obj.Description())
fmt.Fprintf(stdout, "%sApplying %s ", dryRunPrefix, obj.Description()) //nolint:errcheck

if err := o.Applier(o, obj, stdout, stderr); err != nil {
if errors.Is(err, ErrNoApplyMapping) {
Expand Down Expand Up @@ -199,7 +199,7 @@ func DefaultApplier(o *ApplyCommand, obj types.Object, out, err io.Writer) error
return err
}

fmt.Fprintf(out, "(applied successfully)\n")
fmt.Fprintf(out, "(applied successfully)\n") //nolint:errcheck
return nil
}

Expand Down
2 changes: 1 addition & 1 deletion src/cmd/pkg/auth/loginserver.go
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ func (s *loginServer) login(ctx context.Context, stdin io.Reader, stdout, stderr
return nil
}
if err := setDefaultOrg(s.store, s.org); err != nil {
fmt.Fprintf(stderr, "Failed to set default organization: %s\n", err)
fmt.Fprintf(stderr, "Failed to set default organization: %s\n", err) //nolint:errcheck
}
return nil
case err := <-errCh:
Expand Down
Loading
Loading