Skip to content

Commit

Permalink
Bump golang 1.20.3 and golint changes
Browse files Browse the repository at this point in the history
Signed-off-by: sethiyash <[email protected]>
  • Loading branch information
sethiyash committed May 5, 2023
1 parent 6ca16c1 commit 0d87034
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 12 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/golangci-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,16 @@ jobs:
name: lint
runs-on: ubuntu-latest
steps:
- name: Install Go 1.19.6
- name: Install Go
uses: actions/setup-go@v3
with:
go-version: "1.19.6"
go-version: "1.20.3"
- uses: actions/checkout@v2
with:
fetch-depth: '0'
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
uses: golangci/golangci-lint-action@v3.4.0
with:
version: v1.49.0
version: v1.52.2
args: -v

2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.19.6
go-version: 1.20.3
- name: Retrieve version
run: |
echo "TAG_NAME=$(echo ${{ github.ref }} | grep -Eo 'v[0-9].*')" >> $GITHUB_OUTPUT
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-gh.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
- name: Set up Go 1.x
uses: actions/setup-go@v1
with:
go-version: "1.19.6"
go-version: "1.20.3"
- name: Check out code into the Go module directory
uses: actions/checkout@v1
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/trivy-scan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
with:
repo: carvel-dev/vendir
tool: vendir
goVersion: 1.19.6
goVersion: 1.20.3
secrets:
githubToken: ${{ secrets.GITHUB_TOKEN }}
slackWebhookURL: ${{ secrets.SLACK_WEBHOOK_URL }}
2 changes: 1 addition & 1 deletion cmd/vendir/vendir.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import (
)

func main() {
rand.Seed(time.Now().UTC().UnixNano())
rand.New(rand.NewSource(time.Now().UTC().UnixNano()))

log.SetOutput(io.Discard)

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/vmware-tanzu/carvel-vendir

go 1.19
go 1.20

require (
github.com/bmatcuk/doublestar v1.2.1
Expand Down
4 changes: 2 additions & 2 deletions pkg/vendir/directory/staging_dir.go
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ func (d StagingDir) CopyExistingFiles(rootDir string, stagingPath string, ignore
}

// Move the file to the staging directory
err = copy(path, stagingPath)
err = copyFile(path, stagingPath)
if err != nil {
return fmt.Errorf("Moving source file '%s' to staging location '%s': %s", path, stagingPath, err)
}
Expand Down Expand Up @@ -194,7 +194,7 @@ func (d StagingTempArea) NewTempFile(pattern string) (*os.File, error) {
return os.CreateTemp(d.path, pattern)
}

func copy(src, dst string) error {
func copyFile(src, dst string) error {
sourceFileStat, err := os.Stat(src)
if err != nil {
return fmt.Errorf("Unable to read file info: %s", src)
Expand Down
2 changes: 1 addition & 1 deletion pkg/vendir/fetch/ref_fetcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,6 @@ func (f SingleSecretRefFetcher) GetSecret(name string) (ctlconf.Secret, error) {
return ctlconf.Secret{}, fmt.Errorf("Not found")
}

func (f SingleSecretRefFetcher) GetConfigMap(name string) (ctlconf.ConfigMap, error) {
func (f SingleSecretRefFetcher) GetConfigMap(_ string) (ctlconf.ConfigMap, error) {
return ctlconf.ConfigMap{}, fmt.Errorf("Not found")
}

0 comments on commit 0d87034

Please sign in to comment.