Skip to content

Commit

Permalink
chore(deps): update module go to 1.19 (#84)
Browse files Browse the repository at this point in the history
* chore(deps): update module go to 1.19

* chore: bump to go 1.19 in all files

Signed-off-by: Manuel Vogel <[email protected]>

* chore: bump golangci-lint to v1.49.0

Signed-off-by: Manuel Vogel <[email protected]>

* chore: go fmt files

Signed-off-by: Manuel Vogel <[email protected]>

* fix: linter issues

Signed-off-by: Manuel Vogel <[email protected]>

Signed-off-by: Manuel Vogel <[email protected]>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Manuel Vogel <[email protected]>
  • Loading branch information
renovate[bot] and mavogel authored Sep 2, 2022
1 parent 02bed7d commit 10df388
Show file tree
Hide file tree
Showing 9 changed files with 21 additions and 320 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: 1.18
go-version: 1.19
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v3
with:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: 1.18
go-version: 1.19
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
version: v1.46.2
version: v1.49.0
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: 1.18
go-version: 1.19
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v3
with:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: 1.18
go-version: 1.19
- name: Run tests
run: make test
- name: Convert coverage
Expand All @@ -44,7 +44,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: 1.18
go-version: 1.19
- name: Build a release binary
run: |
make build-release
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@ endif

# Dependency versions
GOTESTSUM_VERSION = 1.8.1
GOLANGCI_VERSION = 1.46.2
GOLANGCI_VERSION = 1.49.0
GITCHGLOG_VERSION = 0.15.1
SVU_VERSION = 1.9.0

GOLANG_VERSION = 1.18
GOLANG_VERSION = 1.19

# Add the ability to override some variables
# Use with care
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/kreuzwerker/m1-terraform-provider-helper

go 1.18
go 1.19

require (
github.com/go-git/go-git/v5 v5.4.2
Expand Down
300 changes: 0 additions & 300 deletions go.sum

Large diffs are not rendered by default.

7 changes: 4 additions & 3 deletions internal/app/install.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"encoding/json"
"errors"
"fmt"
"io/ioutil"
"io"
"log"
"net/http"
"os"
Expand Down Expand Up @@ -93,7 +93,7 @@ func getProviderData(providerName string) (Provider, error) {
}

defer res.Body.Close()
body, err := ioutil.ReadAll(res.Body)
body, err := io.ReadAll(res.Body)

if err != nil {
return Provider{}, fmt.Errorf("body reading error %w", err)
Expand All @@ -119,7 +119,8 @@ func cloneRepo(gitURL string, fullPath string) {
}

// if repo is not check out yet
// - clone to cli dir
// - clone to cli dir
//
// if already exists: dont clone, simply cd
// on both casees: checkout version
// return path to dir.
Expand Down
16 changes: 8 additions & 8 deletions internal/app/lockfile.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,14 @@ type ProviderConfig struct {
}

/*
1. find lockfile
parse the correct location
man kann auch per parameter den genauen pfad an den command mitgeben
2. parse lockfile
3. find the entries that have local providers
1. what to do when versions differ?
4. calculate hash sum of local providers and replace the has of the entries
5. Write HCL file back to original destination
1. find lockfile
parse the correct location
man kann auch per parameter den genauen pfad an den command mitgeben
2. parse lockfile
3. find the entries that have local providers
1. what to do when versions differ?
4. calculate hash sum of local providers and replace the has of the entries
5. Write HCL file back to original destination.
*/
func (a *App) UpgradeLockfile(inputLockfilePath string, outputLockfilePath string) {
verifiedLockfilePath := getLockfile(inputLockfilePath)
Expand Down

0 comments on commit 10df388

Please sign in to comment.