diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1bc61c0..9056c00 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -33,7 +33,7 @@ jobs: - name: Setup Go uses: actions/setup-go@v3.3.0 with: - go-version: "1.17" + go-version: "1.19" check-latest: true - name: Run golangci-lint uses: golangci/golangci-lint-action@v3.2.0 @@ -47,9 +47,9 @@ jobs: strategy: matrix: go: - - "1.15" - - "1.16" - "1.17" + - "1.18" + - "1.19" steps: - name: Setup Go uses: actions/setup-go@v3.3.0 diff --git a/.github/workflows/goreleaser.yml b/.github/workflows/goreleaser.yml index e2d2082..8eedd5a 100644 --- a/.github/workflows/goreleaser.yml +++ b/.github/workflows/goreleaser.yml @@ -21,7 +21,7 @@ jobs: - name: Setup Go uses: actions/setup-go@v3.3.0 with: - go-version: "1.17" + go-version: "1.19" check-latest: true - name: Install cyclonedx-gomod uses: CycloneDX/gh-gomod-generate-sbom@v1 diff --git a/Makefile b/Makefile index 8004027..0ddb887 100644 --- a/Makefile +++ b/Makefile @@ -14,5 +14,9 @@ generate: go generate .PHONY: generate +lint: + golangci-lint run +.PHONY: lint + all: clean build test .PHONY: all diff --git a/README.md b/README.md index 557c93d..5f39b93 100644 --- a/README.md +++ b/README.md @@ -31,7 +31,7 @@ Also, checkout the [`examples`](./example_test.go) to get an idea of how this li | < v0.4.0 | 1.14+ | 1.2 | | == v0.4.0 | 1.14+ | 1.3 | | >= v0.5.0 | 1.15+ | 1.4 | -| >= v0.7.0 | 1.15+ | 1.0-1.4 | +| >= v0.7.0 | 1.17+ | 1.0-1.4 | We're aiming to support all [officially supported](https://golang.org/doc/devel/release.html#policy) Go versions, plus an additional older version. diff --git a/encode_test.go b/encode_test.go index 5a5a761..f4546d4 100644 --- a/encode_test.go +++ b/encode_test.go @@ -21,7 +21,6 @@ import ( "bytes" "fmt" "io" - "io/ioutil" "os" "path/filepath" "testing" @@ -110,13 +109,13 @@ func TestXmlBOMEncoder_SetPretty(t *testing.T) { func TestJsonBOMEncoder_EncodeVersion(t *testing.T) { t.Run(SpecVersion1_0.String(), func(t *testing.T) { - err := NewBOMEncoder(ioutil.Discard, BOMFileFormatJSON).EncodeVersion(NewBOM(), SpecVersion1_0) + err := NewBOMEncoder(io.Discard, BOMFileFormatJSON).EncodeVersion(NewBOM(), SpecVersion1_0) require.Error(t, err) require.ErrorContains(t, err, "not supported") }) t.Run(SpecVersion1_1.String(), func(t *testing.T) { - err := NewBOMEncoder(ioutil.Discard, BOMFileFormatJSON).EncodeVersion(NewBOM(), SpecVersion1_1) + err := NewBOMEncoder(io.Discard, BOMFileFormatJSON).EncodeVersion(NewBOM(), SpecVersion1_1) require.Error(t, err) require.ErrorContains(t, err, "not supported") }) diff --git a/go.mod b/go.mod index 4c39f7d..5a889bb 100644 --- a/go.mod +++ b/go.mod @@ -1,8 +1,14 @@ module github.com/CycloneDX/cyclonedx-go -go 1.15 +go 1.17 require ( github.com/bradleyjkemp/cupaloy/v2 v2.8.0 github.com/stretchr/testify v1.8.0 ) + +require ( + github.com/davecgh/go-spew v1.1.1 // indirect + github.com/pmezard/go-difflib v1.0.0 // indirect + gopkg.in/yaml.v3 v3.0.1 // indirect +)