Skip to content

Commit

Permalink
update go to 1.19 (anchore#155)
Browse files Browse the repository at this point in the history
* feat: update golang to 1.19

Go 1.18 will become EOL with the upcoming 1.20 release

Signed-off-by: Bradley Jones <bradley.jones@anchore.com>

* chore: update golangci lint

Move to a newer version of golangci lint compatibile with go 1.19 and
remove now deprecated linters.

Signed-off-by: Bradley Jones <bradley.jones@anchore.com>

* chore: update deprecated ioutil functions

Signed-off-by: Bradley Jones <bradley.jones@anchore.com>

* chore: add crypto/internal/boring to bouncer ignore list

Signed-off-by: Bradley Jones <bradley.jones@anchore.com>

* fix: nolintlint formatting updated

Signed-off-by: Bradley Jones <bradley.jones@anchore.com>

---------

Signed-off-by: Bradley Jones <bradley.jones@anchore.com>
  • Loading branch information
bradleyjones authored and gnmahanth committed Jun 15, 2023
1 parent c5ff155 commit 178bc5c
Show file tree
Hide file tree
Showing 23 changed files with 98 additions and 310 deletions.
6 changes: 5 additions & 1 deletion .bouncer.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,8 @@ permit:
- MIT.*
- Apache.*
- MPL.*
- CC0-1.0
- CC0-1.0

ignore-packages:
# crypto/internal/boring is released under the openSSL license as a part of the Golang Standard Libary
- crypto/internal/boring
2 changes: 1 addition & 1 deletion .github/workflows/validations.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ on:
pull_request:

env:
GO_VERSION: "1.18.x"
GO_VERSION: "1.19.x"

jobs:

Expand Down
4 changes: 0 additions & 4 deletions .golangci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ linters:
enable:
- asciicheck
- bodyclose
- deadcode
- depguard
- dogsled
- dupl
Expand All @@ -29,15 +28,12 @@ linters:
- nakedret
- nolintlint
- revive
- rowserrcheck
- staticcheck
- structcheck
- stylecheck
- typecheck
- unconvert
- unparam
- unused
- varcheck
- whitespace

# do not enable...
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ bootstrap: $(RESULTSDIR) ## Download and install all project dependencies (+ pre
go mod download
# install utilities
[ -f "$(TEMPDIR)/benchstat" ] || GO111MODULE=off GOBIN=$(shell realpath $(TEMPDIR)) go get -u golang.org/x/perf/cmd/benchstat
[ -f "$(TEMPDIR)/golangci" ] || curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(TEMPDIR)/ v1.47.2
[ -f "$(TEMPDIR)/golangci" ] || curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(TEMPDIR)/ v1.50.1
[ -f "$(TEMPDIR)/bouncer" ] || curl -sSfL https://raw.githubusercontent.com/wagoodman/go-bouncer/master/bouncer.sh | sh -s -- -b $(TEMPDIR)/ v0.4.0

.PHONY: static-analysis
Expand Down
5 changes: 3 additions & 2 deletions examples/basic.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@ package main
import (
"context"
"fmt"
"io"

"github.com/anchore/go-logger"
"github.com/anchore/go-logger/adapter/logrus"

"io/ioutil"
"os"

"github.com/anchore/stereoscope"
Expand Down Expand Up @@ -93,7 +94,7 @@ func main() {
panic(err)
}

content, err := ioutil.ReadAll(contentReader)
content, err := io.ReadAll(contentReader)
if err != nil {
panic(err)
}
Expand Down
56 changes: 53 additions & 3 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/anchore/stereoscope

go 1.16
go 1.19

require (
github.com/GoogleCloudPlatform/docker-credential-gcr v2.0.5+incompatible
Expand All @@ -10,8 +10,6 @@ require (
github.com/bmatcuk/doublestar/v4 v4.0.2
github.com/containerd/containerd v1.6.12
github.com/docker/cli v20.10.12+incompatible
// docker/distribution for https://github.com/advisories/GHSA-qq97-vm5h-rrhg
github.com/docker/distribution v2.8.0+incompatible // indirect
github.com/docker/docker v20.10.12+incompatible
github.com/gabriel-vasile/mimetype v1.4.0
github.com/go-test/deep v1.0.8
Expand All @@ -32,3 +30,55 @@ require (
github.com/wagoodman/go-progress v0.0.0-20200621122631-1a2120f0695a
golang.org/x/crypto v0.0.0-20220315160706-3147a52a75dd
)

require (
cloud.google.com/go v0.97.0 // indirect
github.com/Microsoft/go-winio v0.5.2 // indirect
github.com/aws/aws-sdk-go-v2 v1.7.1 // indirect
github.com/aws/aws-sdk-go-v2/config v1.5.0 // indirect
github.com/aws/aws-sdk-go-v2/credentials v1.3.1 // indirect
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.3.0 // indirect
github.com/aws/aws-sdk-go-v2/internal/ini v1.1.1 // indirect
github.com/aws/aws-sdk-go-v2/service/ecr v1.4.1 // indirect
github.com/aws/aws-sdk-go-v2/service/ecrpublic v1.4.1 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.2.1 // indirect
github.com/aws/aws-sdk-go-v2/service/sso v1.3.1 // indirect
github.com/aws/aws-sdk-go-v2/service/sts v1.6.0 // indirect
github.com/aws/smithy-go v1.6.0 // indirect
github.com/containerd/stargz-snapshotter/estargz v0.10.0 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
// docker/distribution for https://github.com/advisories/GHSA-qq97-vm5h-rrhg
github.com/docker/distribution v2.8.0+incompatible // indirect
github.com/docker/docker-credential-helpers v0.6.4 // indirect
github.com/docker/go-connections v0.4.0 // indirect
github.com/docker/go-units v0.4.0 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang/protobuf v1.5.2 // indirect
github.com/google/uuid v1.3.0 // indirect
github.com/hashicorp/errwrap v1.1.0 // indirect
github.com/jmespath/go-jmespath v0.4.0 // indirect
github.com/klauspost/compress v1.15.9 // indirect
github.com/mattn/go-colorable v0.1.12 // indirect
github.com/mattn/go-isatty v0.0.14 // indirect
github.com/mgutz/ansi v0.0.0-20200706080929-d51e80ef957d // indirect
github.com/opencontainers/go-digest v1.0.0 // indirect
github.com/opencontainers/image-spec v1.0.3-0.20211202183452-c5a74bcca799 // indirect
github.com/pierrec/lz4/v4 v4.1.15 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/sirupsen/logrus v1.8.1 // indirect
github.com/stretchr/objx v0.2.0 // indirect
github.com/therootcompany/xz v1.0.1 // indirect
github.com/ulikunitz/xz v0.5.10 // indirect
github.com/vbatts/tar-split v0.11.2 // indirect
golang.org/x/net v0.0.0-20220722155237-a158d28d115b // indirect
golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8 // indirect
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c // indirect
golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f // indirect
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 // indirect
golang.org/x/text v0.3.7 // indirect
google.golang.org/appengine v1.6.7 // indirect
google.golang.org/genproto v0.0.0-20220502173005-c8bf987b8c21 // indirect
google.golang.org/grpc v1.47.0 // indirect
google.golang.org/protobuf v1.28.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)
Loading

0 comments on commit 178bc5c

Please sign in to comment.