Skip to content

Commit

Permalink
Bump up Go version 1.16
Browse files Browse the repository at this point in the history
  • Loading branch information
spiegel-im-spiegel committed Feb 23, 2021
1 parent 626d7b6 commit 22d7d5d
Show file tree
Hide file tree
Showing 9 changed files with 17 additions and 15 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.16
go-version: ^1.16
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v2
with:
Expand Down
11 changes: 6 additions & 5 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,19 @@ on:
pull_request:
jobs:
golangci:
strategy:
matrix:
go-version: [1.16.x]
os: [ubuntu-latest]
name: lint
runs-on: ${{ matrix.os }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
with:
go-version: ^1.16
- name: golangci-lint
uses: golangci/golangci-lint-action@v2
with:
# Required: the version of golangci-lint is required and must be specified without patch version: we always use the latest patch version.
version: latest
# Optional: golangci-lint command line arguments.
args: --enable gosec
- name: testing
run: go test ./...
4 changes: 3 additions & 1 deletion .github/workflows/vulns.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@ jobs:
- uses: actions/setup-go@v2
with:
go-version: ^1.16
- name: install depm
run: go install github.com/spiegel-im-spiegel/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
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
[![GitHub license](https://img.shields.io/badge/license-Apache%202-blue.svg)](https://raw.githubusercontent.com/spiegel-im-spiegel/ml/master/LICENSE)
[![GitHub release](http://img.shields.io/github/release/spiegel-im-spiegel/ml.svg)](https://github.com/spiegel-im-spiegel/ml/releases/latest)

This package is required Go 1.16 or later.

## Build and Install

```
Expand Down
Binary file modified dependency.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 1 addition & 3 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,7 @@ require (
github.com/spf13/cobra v1.1.3
github.com/spiegel-im-spiegel/errs v1.0.2
github.com/spiegel-im-spiegel/fetch v0.2.2
github.com/spiegel-im-spiegel/gocli v0.10.3
github.com/spiegel-im-spiegel/gocli v0.10.4
github.com/zetamatta/go-readline-ny v0.4.3
golang.org/x/net v0.0.0-20201224014010-6772e930b67b
)

replace github.com/coreos/etcd v3.3.13+incompatible => github.com/coreos/etcd v3.3.25+incompatible
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -175,8 +175,8 @@ github.com/spiegel-im-spiegel/errs v1.0.2 h1:v4amEwRDqRWjKHOILQnJSovYhZ4ZttEnBBX
github.com/spiegel-im-spiegel/errs v1.0.2/go.mod h1:UoasJYYujMcdkbT9USv8dfZWoMyaY3btqQxoLJImw0A=
github.com/spiegel-im-spiegel/fetch v0.2.2 h1:of03ciFaq9arqhvvXeMeotpHa9zn2ogKwFtTHTtDkU8=
github.com/spiegel-im-spiegel/fetch v0.2.2/go.mod h1:IQvb70onwbv58/tGz1QhKYEaZs/2ehPaHMva39/jrrU=
github.com/spiegel-im-spiegel/gocli v0.10.3 h1:+9V71Tl3ELjNEsEcXVSZKxJHaiTC55mVsPQwrZq8AAc=
github.com/spiegel-im-spiegel/gocli v0.10.3/go.mod h1:9vRvly2giutJ2sAtQjrw570p9ulJA3twgKlurmnj12g=
github.com/spiegel-im-spiegel/gocli v0.10.4 h1:aoAWdiQ4hjNxmEod4EeTZTcjdCJcrNOwgHBs5BQYnEQ=
github.com/spiegel-im-spiegel/gocli v0.10.4/go.mod h1:ffI3zoggRyLOZ+IIgaVN8WVMUwfIwfvCEd/0Yl/PZ98=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
Expand Down
3 changes: 1 addition & 2 deletions makelink/makelink.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import (
"encoding/json"
"fmt"
"io"
"io/ioutil"
"net/http"
"strings"

Expand Down Expand Up @@ -100,7 +99,7 @@ func (lnk *Link) TitleName() string {
//Encode returns string (io.Reader) with other style
func (lnk *Link) Encode(t Style) io.Reader {
if lnk == nil {
return ioutil.NopCloser(bytes.NewReader(nil))
return io.NopCloser(bytes.NewReader(nil))
}
buf := &bytes.Buffer{}
switch t {
Expand Down
2 changes: 1 addition & 1 deletion test-all.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
go mod verify || exit 1
go mod tidy -v || exit 1
depm list --json | docker run --rm -i sonatypecommunity/nancy:latest sleuth -n || exit 1
docker run --rm -v $(pwd):/app -w /app golangci/golangci-lint:latest golangci-lint run --enable gosec ./... || exit 1
docker run --rm -v $(pwd):/app -w /app golangci/golangci-lint:v1.37.1 golangci-lint run --enable gosec ./... || exit 1
go test ./... || exit 1
depm m --dot --dot-config dot-config.toml | dot -Tpng -o dependency.png

0 comments on commit 22d7d5d

Please sign in to comment.