diff --git a/.github/workflows/vulns.yml b/.github/workflows/vulns.yml index 2200dfa..2c51e0e 100644 --- a/.github/workflows/vulns.yml +++ b/.github/workflows/vulns.yml @@ -12,8 +12,10 @@ jobs: - uses: actions/checkout@v3 - uses: actions/setup-go@v3 with: - go-version: ^1.20 + go-version-file: 'go.mod' + - name: install depm + run: go install github.com/goark/depm@latest - name: WriteGoList - run: go list -json -m all > go.list + run: depm list --json > go.list - name: Nancy uses: sonatype-nexus-community/nancy-github-action@main diff --git a/Taskfile.yml b/Taskfile.yml index 5822f33..b3ec4ff 100644 --- a/Taskfile.yml +++ b/Taskfile.yml @@ -3,7 +3,7 @@ version: '3' tasks: default: cmds: - - task: clean + - task: prepare - task: test - task: nancy @@ -12,7 +12,7 @@ tasks: cmds: - go mod verify - go test -shuffle on ./... - - docker run --rm -v $(pwd):/app -w /app golangci/golangci-lint:v1.50.1 golangci-lint run --enable gosec --timeout 3m0s ./... + - docker run --rm -v $(pwd):/app -w /app golangci/golangci-lint:latest golangci-lint run --enable gosec --timeout 3m0s ./... sources: - ./go.mod - '**/*.go' @@ -25,7 +25,12 @@ tasks: - ./go.mod - '**/*.go' + prepare: + - go mod tidy -v -go=1.22 + clean: desc: Initialize module and build cache, and remake go.sum file. cmds: - - go mod tidy -v -go=1.20 + - rm -f ./go.sum + - go clean -cache + - go clean -modcache diff --git a/go.mod b/go.mod index 838e90e..9db8b74 100644 --- a/go.mod +++ b/go.mod @@ -1,8 +1,10 @@ module github.com/goark/go-cvss -go 1.20 +go 1.22 + +toolchain go1.22.1 require ( - github.com/goark/errs v1.1.0 - golang.org/x/text v0.6.0 + github.com/goark/errs v1.3.2 + golang.org/x/text v0.14.0 ) diff --git a/go.sum b/go.sum index 6170d52..cee057f 100644 --- a/go.sum +++ b/go.sum @@ -1,4 +1,4 @@ -github.com/goark/errs v1.1.0 h1:FKnyw4LVyRADIjM8Nj0Up6r0/y5cfADvZAd1E+tthXE= -github.com/goark/errs v1.1.0/go.mod h1:TtaPEoadm2mzqzfXdkkfpN2xuniCFm2q4JH+c1qzaqw= -golang.org/x/text v0.6.0 h1:3XmdazWV+ubf7QgHSTWeykHOci5oeekaGJBLkrkaw4k= -golang.org/x/text v0.6.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= +github.com/goark/errs v1.3.2 h1:ifccNe1aK7Xezt4XVYwHUqalmnfhuphnEvh3FshCReQ= +github.com/goark/errs v1.3.2/go.mod h1:ZsQucxaDFVfSB8I99j4bxkDRfNOrlKINwg72QMuRWKw= +golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= +golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU=