From f8df0bdfd2f75ec81a6ecd02dc783af368ffff6d Mon Sep 17 00:00:00 2001 From: Derek Smith Date: Thu, 11 Jan 2024 11:10:01 -0600 Subject: [PATCH] chore: bump go version to 1.18 for generics support and update CI (#25) Signed-off-by: clok --- .github/workflows/edge.yml | 2 +- .github/workflows/lint.yml | 4 ++-- .github/workflows/release.yml | 2 +- .github/workflows/warm.yaml | 2 +- .golangci.yml | 19 +++++++++++++++++++ go.mod | 26 +++++++++++++++++++++++--- go.sum | 2 -- 7 files changed, 47 insertions(+), 10 deletions(-) diff --git a/.github/workflows/edge.yml b/.github/workflows/edge.yml index ffe9365..88b9715 100644 --- a/.github/workflows/edge.yml +++ b/.github/workflows/edge.yml @@ -11,7 +11,7 @@ env: jobs: edge: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - name: Checkout uses: actions/checkout@v3 diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 5e4f357..321b877 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -3,10 +3,10 @@ on: [ push, pull_request ] jobs: golangci: name: lint - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v3 - name: golangci-lint uses: golangci/golangci-lint-action@v3 with: - version: v1.38 + version: v1.55 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 80dcb9a..9c673d7 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -11,7 +11,7 @@ env: jobs: goreleaser: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - name: Checkout uses: actions/checkout@v3 diff --git a/.github/workflows/warm.yaml b/.github/workflows/warm.yaml index 1ef18db..1c9d447 100644 --- a/.github/workflows/warm.yaml +++ b/.github/workflows/warm.yaml @@ -9,7 +9,7 @@ on: jobs: build: name: Renew documentation - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 steps: - name: Pull new module version uses: clok/go-proxy-pull-action@master \ No newline at end of file diff --git a/.golangci.yml b/.golangci.yml index 848c27e..17016c6 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -19,3 +19,22 @@ linters: - golint - misspell - unconvert + +linters-settings: + depguard: + rules: + prevent_unmaintained_packages: + list-mode: lax # allow unless explicitely denied + files: + - $all + - "!$test" + allow: + - $gostd + - 'github.com/clok' + - 'github.com/urfave/cli/v2' + - 'github.com/aws/aws-sdk-go' + - 'github.com/jedib0t/go-pretty' + - 'github.com/a8m/djson' + - 'github.com/TylerBrock/colorjson' + - 'github.com/AlecAivazis/survey/v2' + - 'github.com/logrusorgru/aurora/v3' diff --git a/go.mod b/go.mod index ba2d450..a24f221 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/clok/sm -go 1.16 +go 1.18 require ( github.com/AlecAivazis/survey/v2 v2.3.4 @@ -9,9 +9,29 @@ require ( github.com/aws/aws-sdk-go v1.44.20 github.com/clok/awssession v1.1.2 github.com/clok/cdocs v1.2.0 - github.com/fatih/color v1.12.0 // indirect - github.com/hokaccha/go-prettyjson v0.0.0-20210113012101-fb4e108d2519 // indirect github.com/jedib0t/go-pretty/v6 v6.3.1 github.com/logrusorgru/aurora/v3 v3.0.0 github.com/urfave/cli/v2 v2.8.0 ) + +require ( + github.com/antzucaro/matchr v0.0.0-20210222213004-b04723ef80f0 // indirect + github.com/clok/kemba v1.1.1 // indirect + github.com/cpuguy83/go-md2man/v2 v2.0.1 // indirect + github.com/fatih/color v1.12.0 // indirect + github.com/gookit/color v1.3.8 // indirect + github.com/hokaccha/go-prettyjson v0.0.0-20210113012101-fb4e108d2519 // indirect + github.com/jmespath/go-jmespath v0.4.0 // indirect + github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 // indirect + github.com/kr/pretty v0.2.1 // indirect + github.com/kr/text v0.2.0 // indirect + github.com/mattn/go-colorable v0.1.8 // indirect + github.com/mattn/go-isatty v0.0.12 // indirect + github.com/mattn/go-runewidth v0.0.13 // indirect + github.com/mgutz/ansi v0.0.0-20170206155736-9520e82c474b // indirect + github.com/rivo/uniseg v0.2.0 // indirect + github.com/russross/blackfriday/v2 v2.1.0 // indirect + golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e // indirect + golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 // indirect + golang.org/x/text v0.3.7 // indirect +) diff --git a/go.sum b/go.sum index ff2e67d..56a2b45 100644 --- a/go.sum +++ b/go.sum @@ -1,7 +1,6 @@ github.com/AlecAivazis/survey/v2 v2.3.4 h1:pchTU9rsLUSvWEl2Aq9Pv3k0IE2fkqtGxazskAMd9Ng= github.com/AlecAivazis/survey/v2 v2.3.4/go.mod h1:hrV6Y/kQCLhIZXGcriDCUBtB3wnN7156gMXJ3+b23xM= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= -github.com/BurntSushi/toml v1.1.0/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ= github.com/Netflix/go-expect v0.0.0-20220104043353-73e0943537d2 h1:+vx7roKuyA63nhn5WAunQHLTznkw5W8b1Xc0dNjp83s= github.com/Netflix/go-expect v0.0.0-20220104043353-73e0943537d2/go.mod h1:HBCaDeC1lPdgDeDbhX8XFpy1jqjK0IBG8W5K+xYqA0w= github.com/TylerBrock/colorjson v0.0.0-20200706003622-8a50f05110d2 h1:ZBbLwSJqkHBuFDA6DUhhse0IGJ7T5bemHyNILUjvOq4= @@ -111,6 +110,5 @@ gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8 gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= -gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=