Skip to content

Commit

Permalink
Update GitHub Actions workflows to use setup-go@v5 and golangci-lint-…
Browse files Browse the repository at this point in the history
…action@v6; refactor error formatting and import statements

Signed-off-by: devhindo <[email protected]>
  • Loading branch information
devhindo committed Dec 28, 2024
1 parent 9a4f3b1 commit f6fe69e
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build-and-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
with:
fetch-depth: 1
- name: Setup Go
uses: actions/setup-go@v4
uses: actions/setup-go@v5
with:
go-version: 1.23
- run: GOPROXY=direct GOSUMDB=off GO111MODULE=on go build .
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ jobs:
name: Check & Review code
runs-on: ubuntu-latest
steps:
- uses: actions/setup-go@v4
- uses: actions/setup-go@v5
with:
go-version: 1.23
- uses: actions/checkout@master
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
uses: golangci/golangci-lint-action@v6
with:
# Required: the version of golangci-lint is required and must be specified without patch version: we always use the latest patch version.
version: v1.54
Expand All @@ -40,7 +40,7 @@ jobs:
with:
fetch-depth: 1
- name: Setup Go
uses: actions/setup-go@v4
uses: actions/setup-go@v5
with:
go-version: 1.23
- 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 ./...
Expand All @@ -53,7 +53,7 @@ jobs:
with:
fetch-depth: 1
- name: Setup Go
uses: actions/setup-go@v4
uses: actions/setup-go@v5
with:
go-version: 1.23
- run: |
Expand All @@ -75,7 +75,7 @@ jobs:
with:
fetch-depth: 1
- name: Setup Go
uses: actions/setup-go@v4
uses: actions/setup-go@v5
with:
go-version: 1.23
- uses: dominikh/[email protected]
Expand All @@ -91,7 +91,7 @@ jobs:
with:
fetch-depth: 1
- name: Setup Go
uses: actions/setup-go@v4
uses: actions/setup-go@v5
with:
go-version: 1.23
- run: GOPROXY=https://proxy.golang.org,direct GOSUMDB=off GO111MODULE=on go vet -tags draft ./...
Expand Down Expand Up @@ -121,7 +121,7 @@ jobs:
with:
fetch-depth: 1
- name: Setup Go
uses: actions/setup-go@v4
uses: actions/setup-go@v5
with:
go-version: 1.23
- name: Create cluster using KinD
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/component-generator.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
token: ${{ secrets.GH_ACCESS_TOKEN }}
ref: "master"
- name: Setup Go
uses: actions/setup-go@v4
uses: actions/setup-go@v5
with:
go-version: 1.23
- name: Run adapter to create components
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/error-ref-publisher.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
ref: 'master'

- name: Setup Go
uses: actions/setup-go@v4
uses: actions/setup-go@v5
with:
go-version: 1.23

Expand Down
2 changes: 1 addition & 1 deletion cilium/cilium.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ import (
"github.com/layer5io/meshkit/errors"
"github.com/layer5io/meshkit/logger"
"github.com/layer5io/meshkit/models"
"github.com/layer5io/meshkit/utils"
"github.com/layer5io/meshkit/models/oam/core/v1alpha1"
"github.com/layer5io/meshkit/utils"
"github.com/layer5io/meshkit/utils/events"
"gopkg.in/yaml.v2"
)
Expand Down
2 changes: 1 addition & 1 deletion cilium/oam.go
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ func mergeErrors(errs []error) error {
errMsgs = append(errMsgs, err.Error())
}

return fmt.Errorf(strings.Join(errMsgs, "\n"))
return fmt.Errorf("%s", strings.Join(errMsgs, "\n"))
}

func mergeMsgs(strs []string) string {
Expand Down
2 changes: 1 addition & 1 deletion cilium/oam/register.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,4 +77,4 @@ func loadMeshmodelComponents(basepath string) ([]meshmodelDefinitionPathSet, err
}

return res, nil
}
}
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ func init() {
func main() {
// Initialize Logger instance
log, err := logger.New(serviceName, logger.Options{
Format: logger.SyslogLogFormat,
Format: logger.SyslogLogFormat,
})
if err != nil {
fmt.Println(err)
Expand Down

0 comments on commit f6fe69e

Please sign in to comment.