Skip to content

Commit f6fe69e

Browse files
committed
Update GitHub Actions workflows to use setup-go@v5 and golangci-lint-action@v6; refactor error formatting and import statements
Signed-off-by: devhindo <[email protected]>
1 parent 9a4f3b1 commit f6fe69e

File tree

8 files changed

+14
-14
lines changed

8 files changed

+14
-14
lines changed

.github/workflows/build-and-release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
with:
2020
fetch-depth: 1
2121
- name: Setup Go
22-
uses: actions/setup-go@v4
22+
uses: actions/setup-go@v5
2323
with:
2424
go-version: 1.23
2525
- run: GOPROXY=direct GOSUMDB=off GO111MODULE=on go build .

.github/workflows/ci.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@ jobs:
1313
name: Check & Review code
1414
runs-on: ubuntu-latest
1515
steps:
16-
- uses: actions/setup-go@v4
16+
- uses: actions/setup-go@v5
1717
with:
1818
go-version: 1.23
1919
- uses: actions/checkout@master
2020
- name: golangci-lint
21-
uses: golangci/golangci-lint-action@v3
21+
uses: golangci/golangci-lint-action@v6
2222
with:
2323
# Required: the version of golangci-lint is required and must be specified without patch version: we always use the latest patch version.
2424
version: v1.54
@@ -40,7 +40,7 @@ jobs:
4040
with:
4141
fetch-depth: 1
4242
- name: Setup Go
43-
uses: actions/setup-go@v4
43+
uses: actions/setup-go@v5
4444
with:
4545
go-version: 1.23
4646
- run: GOPROXY=https://proxy.golang.org,direct GOSUMDB=off GO111MODULE=on go install github.com/kisielk/errcheck@latest; /home/runner/go/bin/errcheck -tags draft ./...
@@ -53,7 +53,7 @@ jobs:
5353
with:
5454
fetch-depth: 1
5555
- name: Setup Go
56-
uses: actions/setup-go@v4
56+
uses: actions/setup-go@v5
5757
with:
5858
go-version: 1.23
5959
- run: |
@@ -75,7 +75,7 @@ jobs:
7575
with:
7676
fetch-depth: 1
7777
- name: Setup Go
78-
uses: actions/setup-go@v4
78+
uses: actions/setup-go@v5
7979
with:
8080
go-version: 1.23
8181
- uses: dominikh/[email protected]
@@ -91,7 +91,7 @@ jobs:
9191
with:
9292
fetch-depth: 1
9393
- name: Setup Go
94-
uses: actions/setup-go@v4
94+
uses: actions/setup-go@v5
9595
with:
9696
go-version: 1.23
9797
- run: GOPROXY=https://proxy.golang.org,direct GOSUMDB=off GO111MODULE=on go vet -tags draft ./...
@@ -121,7 +121,7 @@ jobs:
121121
with:
122122
fetch-depth: 1
123123
- name: Setup Go
124-
uses: actions/setup-go@v4
124+
uses: actions/setup-go@v5
125125
with:
126126
go-version: 1.23
127127
- name: Create cluster using KinD

.github/workflows/component-generator.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
token: ${{ secrets.GH_ACCESS_TOKEN }}
1717
ref: "master"
1818
- name: Setup Go
19-
uses: actions/setup-go@v4
19+
uses: actions/setup-go@v5
2020
with:
2121
go-version: 1.23
2222
- name: Run adapter to create components

.github/workflows/error-ref-publisher.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
ref: 'master'
2020

2121
- name: Setup Go
22-
uses: actions/setup-go@v4
22+
uses: actions/setup-go@v5
2323
with:
2424
go-version: 1.23
2525

cilium/cilium.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ import (
2828
"github.com/layer5io/meshkit/errors"
2929
"github.com/layer5io/meshkit/logger"
3030
"github.com/layer5io/meshkit/models"
31-
"github.com/layer5io/meshkit/utils"
3231
"github.com/layer5io/meshkit/models/oam/core/v1alpha1"
32+
"github.com/layer5io/meshkit/utils"
3333
"github.com/layer5io/meshkit/utils/events"
3434
"gopkg.in/yaml.v2"
3535
)

cilium/oam.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ func mergeErrors(errs []error) error {
151151
errMsgs = append(errMsgs, err.Error())
152152
}
153153

154-
return fmt.Errorf(strings.Join(errMsgs, "\n"))
154+
return fmt.Errorf("%s", strings.Join(errMsgs, "\n"))
155155
}
156156

157157
func mergeMsgs(strs []string) string {

cilium/oam/register.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,4 +77,4 @@ func loadMeshmodelComponents(basepath string) ([]meshmodelDefinitionPathSet, err
7777
}
7878

7979
return res, nil
80-
}
80+
}

main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ func init() {
5353
func main() {
5454
// Initialize Logger instance
5555
log, err := logger.New(serviceName, logger.Options{
56-
Format: logger.SyslogLogFormat,
56+
Format: logger.SyslogLogFormat,
5757
})
5858
if err != nil {
5959
fmt.Println(err)

0 commit comments

Comments
 (0)