Skip to content

Commit 209cbb1

Browse files
Merge pull request #171 from jacobweinstock/update-go
Update Go to 1.23: ## Description <!--- Please describe what this PR is going to change --> Needed for security dependency updates. ## Why is this needed <!--- Link to issue you have raised --> Fixes: # ## How Has This Been Tested? <!--- Please describe in detail how you tested your changes. --> <!--- Include details of your testing environment, and the tests you ran to --> <!--- see how your change affects other areas of the code, etc. --> ## How are existing users impacted? What migration steps/scripts do we need? <!--- Fixes a bug, unblocks installation, removes a component of the stack etc --> <!--- Requires a DB migration script, etc. --> ## Checklist: I have: - [ ] updated the documentation and/or roadmap (if required) - [ ] added unit or e2e tests - [ ] provided instructions on how to upgrade
2 parents 67791ae + 289d81c commit 209cbb1

File tree

18 files changed

+31
-31
lines changed

18 files changed

+31
-31
lines changed

.github/workflows/ci.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
- name: Install Go
1515
uses: actions/[email protected]
1616
with:
17-
go-version: '1.20'
17+
go-version: '1.23'
1818
- name: go fmt
1919
run: go get golang.org/x/tools/cmd/goimports && goimports -d . | (! grep .)
2020
- name: prepare go mod

.golangci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,10 +78,10 @@ linters-settings:
7878
- name: waitgroup-by-value
7979

8080
staticcheck:
81-
go: "1.20"
81+
go: "1.23"
8282

8383
unused:
84-
go: "1.20"
84+
go: "1.23"
8585

8686
output:
8787
sort-results: true

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM golang:1.20 as builder
1+
FROM golang:1.23 as builder
22

33
WORKDIR /code
44
COPY go.mod go.sum /code/

Makefile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -104,9 +104,9 @@ run-image: ## run PBnJ container image
104104
# BEGIN: lint-install .
105105
# http://github.com/tinkerbell/lint-install
106106

107-
GOLINT_VERSION ?= v1.52.2
108-
HADOLINT_VERSION ?= v2.7.0
109-
SHELLCHECK_VERSION ?= v0.7.2
107+
GOLINT_VERSION ?= v1.63.4
108+
HADOLINT_VERSION ?= v2.12.0
109+
SHELLCHECK_VERSION ?= v0.10.0
110110
LINT_OS := $(shell uname)
111111
LINT_ARCH := $(shell uname -m)
112112

@@ -132,7 +132,7 @@ out/linters/shellcheck-$(SHELLCHECK_VERSION)-$(LINT_ARCH)/shellcheck:
132132

133133
out/linters/hadolint-$(HADOLINT_VERSION)-$(LINT_ARCH):
134134
mkdir -p out/linters
135-
curl -sfL https://github.com/hadolint/hadolint/releases/download/v2.6.1/hadolint-$(LINT_OS)-$(LINT_ARCH) > out/linters/hadolint-$(HADOLINT_VERSION)-$(LINT_ARCH)
135+
curl -sfL https://github.com/hadolint/hadolint/releases/download/$(HADOLINT_VERSION)/hadolint-$(LINT_OS)-$(LINT_ARCH) > out/linters/hadolint-$(HADOLINT_VERSION)-$(LINT_ARCH)
136136
chmod u+x out/linters/hadolint-$(HADOLINT_VERSION)-$(LINT_ARCH)
137137

138138
out/linters/golangci-lint-$(GOLINT_VERSION)-$(LINT_ARCH):

cmd/machine.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ var machineCmd = &cobra.Command{
1616
Use: "machine",
1717
Short: "Run PBnJ client machine actions",
1818
Long: `Run PBnJ client for machine actions.`,
19-
Run: func(cmd *cobra.Command, args []string) {
19+
Run: func(_ *cobra.Command, _ []string) {
2020
var opts []grpc.DialOption
2121
ctx := context.Background()
2222
ctx, cancel := context.WithCancel(ctx)

cmd/nmi.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ var (
1616
Use: "nmi",
1717
Short: "Send NMI",
1818
Long: `Tell the target BMC to send an NMI to the system`,
19-
Run: func(cmd *cobra.Command, args []string) {
19+
Run: func(_ *cobra.Command, _ []string) {
2020
var opts []grpc.DialOption
2121
ctx := context.Background()
2222

cmd/root.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ var rootCmd = &cobra.Command{
2222
Use: "pbnj",
2323
Short: "PBnJ does all your power, boot and jelly goodness for your BMCs",
2424
Long: `PBnJ is a CLI that provides a gRPC interfaces for interacting with Out-of-Band controllers/BMCs.`,
25-
PersistentPreRunE: func(cmd *cobra.Command, args []string) error {
25+
PersistentPreRunE: func(cmd *cobra.Command, _ []string) error {
2626
return initConfig(cmd)
2727
},
2828
}

cmd/screenshot.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ var (
1616
Use: "screenshot",
1717
Short: "Take a screenshot",
1818
Long: `Take a screenshot of a target BMC`,
19-
Run: func(cmd *cobra.Command, args []string) {
19+
Run: func(_ *cobra.Command, _ []string) {
2020
var opts []grpc.DialOption
2121
ctx := context.Background()
2222

cmd/sel.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ var (
1616
Use: "selclear",
1717
Short: "Clear the System Event Log",
1818
Long: `Clear the System Event Log of the target BMC`,
19-
Run: func(cmd *cobra.Command, args []string) {
19+
Run: func(_ *cobra.Command, _ []string) {
2020
var opts []grpc.DialOption
2121
ctx := context.Background()
2222

cmd/server.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ var (
5353
Use: "server",
5454
Short: "Run PBnJ server",
5555
Long: `Run PBnJ server for interacting with BMCs.`,
56-
Run: func(cmd *cobra.Command, args []string) {
56+
Run: func(_ *cobra.Command, _ []string) {
5757
ctx := context.Background()
5858
ctx, cancel := context.WithCancel(ctx)
5959
defer cancel()
@@ -63,7 +63,7 @@ var (
6363

6464
logger := defaultLogger(logLevel).WithName("github.com/tinkerbell/pbnj").WithValues("service", "github.com/tinkerbell/pbnj")
6565

66-
authzInterceptor := func(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (interface{}, error) {
66+
authzInterceptor := func(ctx context.Context, req interface{}, _ *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (interface{}, error) {
6767
return handler(ctx, req)
6868
}
6969
if enableAuthz {

0 commit comments

Comments
 (0)