Skip to content

Commit

Permalink
Use go 1.19 to close #108
Browse files Browse the repository at this point in the history
  • Loading branch information
xakep666 committed Aug 13, 2022
1 parent 2d7d83f commit 94db541
Show file tree
Hide file tree
Showing 15 changed files with 71 additions and 54 deletions.
2 changes: 1 addition & 1 deletion .github/aur/kafkactl/PKGBUILD.template
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ url="https://github.com/deviceinsight/kafkactl/"
arch=("i686" "x86_64" "aarch64")
license=("APACHE")
depends=("glibc")
makedepends=('go>=1.16')
makedepends=('go>=1.19')
optdepends=('kubectl: for kafka running in Kubernetes cluster',
'bash-completion: auto-completion for kafkactl in Bash',
'zsh-completions: auto-completion for kafkactl in ZSH')
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/lint_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
with:
go-version: 1.16
go-version: 1.19
- name: Run Unit tests
run: make test
- name: Upload logs
Expand Down Expand Up @@ -57,7 +57,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
with:
go-version: 1.16
go-version: 1.19
- name: Run integration tests
run: make integration_test
- name: Upload logs
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish_ghpages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
-
uses: actions/setup-go@v2
with:
go-version: 1.16
go-version: 1.19
-
name: Build and generate docs
run: make docs
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.16
go-version: 1.19
-
name: Snapcraft login
uses: samuelmeuli/action-snapcraft@v1
Expand Down
2 changes: 1 addition & 1 deletion .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ issues:
exclude-rules:
- linters:
- staticcheck
text: 'SA1019: package github.com/golang/protobuf/jsonpb is deprecated' # dependency of github.com/jhump/protoreflect, see https://github.com/jhump/protoreflect/issues/463
text: 'SA1019:.*github.com/golang/protobuf/jsonpb.*deprecated' # dependency of github.com/jhump/protoreflect, see https://github.com/jhump/protoreflect/issues/463
4 changes: 2 additions & 2 deletions cmd/config/view.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package config

import (
"io/ioutil"
"os"

"github.com/deviceinsight/kafkactl/output"
"github.com/pkg/errors"
Expand All @@ -17,7 +17,7 @@ func newViewCmd() *cobra.Command {
Long: `Shows the contents of the config file that is currently used`,
Run: func(cmd *cobra.Command, args []string) {

yamlFile, err := ioutil.ReadFile(viper.ConfigFileUsed())
yamlFile, err := os.ReadFile(viper.ConfigFileUsed())
if err != nil {
output.Fail(errors.Wrap(err, "unable to read config"))
}
Expand Down
3 changes: 1 addition & 2 deletions cmd/config/view_test.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package config_test

import (
"io/ioutil"
"os"
"path"
"testing"
Expand Down Expand Up @@ -47,7 +46,7 @@ current-context: default`
t.Fatalf("failed to execute command: %v", err)
}

configContent, err := ioutil.ReadFile(newConfigFile)
configContent, err := os.ReadFile(newConfigFile)
if err != nil {
t.Fatalf("error reading generated config %s %v", newConfigFile, err)
}
Expand Down
5 changes: 2 additions & 3 deletions cmd/produce/produce_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import (
"bufio"
"encoding/hex"
"fmt"
"io/ioutil"
"os"
"path/filepath"
"strconv"
Expand Down Expand Up @@ -480,7 +479,7 @@ func TestProduceLongMessageSucceedsIntegration(t *testing.T) {

topic := testutil.CreateTopic(t, "produce-topic-long")

file, err := ioutil.TempFile(os.TempDir(), "long-message-")
file, err := os.CreateTemp(os.TempDir(), "long-message-")
if err != nil {
t.Fatalf("unable to generate test file: %v", err)
}
Expand Down Expand Up @@ -510,7 +509,7 @@ func TestProduceLongMessageFailsIntegration(t *testing.T) {

topic := testutil.CreateTopic(t, "produce-topic-long")

file, err := ioutil.TempFile(os.TempDir(), "long-message-")
file, err := os.CreateTemp(os.TempDir(), "long-message-")
if err != nil {
t.Fatalf("unable to generate test file: %v", err)
}
Expand Down
2 changes: 1 addition & 1 deletion docker/run-integration-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,5 @@ ${SCRIPT_DIR}/wait-for-kafka.sh
[ -f integration-test.log ] && rm integration-test.log

# run integration tests
go get gotest.tools/gotestsum
go install gotest.tools/gotestsum
gotestsum --format testname -- -run Integration ./...
69 changes: 51 additions & 18 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,39 +1,72 @@
module github.com/deviceinsight/kafkactl

go 1.19

require (
github.com/Rican7/retry v0.1.0
github.com/Shopify/sarama v1.30.0
github.com/fsnotify/fsnotify v1.4.9 // indirect
github.com/golang/protobuf v1.4.2
github.com/google/go-cmp v0.5.5 // indirect
github.com/jhump/protoreflect v1.10.1
github.com/landoop/schema-registry v0.0.0-20190327143759-50a5701c1891
github.com/linkedin/goavro/v2 v2.10.0
github.com/magiconair/properties v1.8.4 // indirect
github.com/mitchellh/mapstructure v1.3.3 // indirect
github.com/onsi/ginkgo v1.8.0 // indirect
github.com/onsi/gomega v1.4.3 // indirect
github.com/pelletier/go-toml v1.8.1 // indirect
github.com/pkg/errors v0.9.1
github.com/spf13/afero v1.4.0 // indirect
github.com/spf13/cast v1.3.1 // indirect
github.com/spf13/cobra v1.0.1-0.20200629195214-2c5a0d300f8b
github.com/spf13/jwalterweatherman v1.1.0 // indirect
github.com/spf13/pflag v1.0.5
github.com/spf13/viper v1.7.1
github.com/xdg/scram v0.0.0-20180814205039-7eeb5667e42c
github.com/xdg/stringprep v1.0.3 // indirect
go.uber.org/atomic v1.5.1 // indirect
go.uber.org/ratelimit v0.1.0
golang.org/x/sync v0.0.0-20220513210516-0976fa681c29
golang.org/x/tools v0.1.0 // indirect
google.golang.org/protobuf v1.25.1-0.20200805231151-a709e31e5d12
gopkg.in/airbrake/gobrake.v2 v2.0.9 // indirect
gopkg.in/errgo.v2 v2.1.0
gopkg.in/gemnasium/logrus-airbrake-hook.v2 v2.1.2 // indirect
gopkg.in/ini.v1 v1.61.0 // indirect
gopkg.in/yaml.v2 v2.3.0
gotest.tools/gotestsum v1.8.1 // indirect
)

go 1.16
require (
github.com/cpuguy83/go-md2man/v2 v2.0.0 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/dnephin/pflag v1.0.7 // indirect
github.com/eapache/go-resiliency v1.2.0 // indirect
github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21 // indirect
github.com/eapache/queue v1.1.0 // indirect
github.com/fatih/color v1.10.0 // indirect
github.com/fsnotify/fsnotify v1.4.9 // indirect
github.com/golang/snappy v0.0.4 // indirect
github.com/google/go-cmp v0.5.5 // indirect
github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 // indirect
github.com/hashicorp/go-uuid v1.0.2 // indirect
github.com/hashicorp/hcl v1.0.0 // indirect
github.com/inconshreveable/mousetrap v1.0.0 // indirect
github.com/jcmturner/aescts/v2 v2.0.0 // indirect
github.com/jcmturner/dnsutils/v2 v2.0.0 // indirect
github.com/jcmturner/gofork v1.0.0 // indirect
github.com/jcmturner/gokrb5/v8 v8.4.2 // indirect
github.com/jcmturner/rpc/v2 v2.0.3 // indirect
github.com/jonboulle/clockwork v0.2.2 // indirect
github.com/klauspost/compress v1.13.6 // indirect
github.com/magiconair/properties v1.8.4 // indirect
github.com/mattn/go-colorable v0.1.8 // indirect
github.com/mattn/go-isatty v0.0.12 // indirect
github.com/mitchellh/mapstructure v1.3.3 // indirect
github.com/pelletier/go-toml v1.8.1 // indirect
github.com/pierrec/lz4 v2.6.1+incompatible // indirect
github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 // indirect
github.com/russross/blackfriday/v2 v2.0.1 // indirect
github.com/shurcooL/sanitized_anchor_name v1.0.0 // indirect
github.com/spf13/afero v1.4.0 // indirect
github.com/spf13/cast v1.3.1 // indirect
github.com/spf13/jwalterweatherman v1.1.0 // indirect
github.com/subosito/gotenv v1.2.0 // indirect
github.com/xdg/stringprep v1.0.3 // indirect
go.uber.org/atomic v1.5.1 // indirect
golang.org/x/crypto v0.0.0-20210920023735-84f357641f63 // indirect
golang.org/x/mod v0.3.0 // indirect
golang.org/x/net v0.0.0-20210917221730-978cfadd31cf // indirect
golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1 // indirect
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1 // indirect
golang.org/x/text v0.3.7 // indirect
golang.org/x/tools v0.1.0 // indirect
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 // indirect
google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013 // indirect
gopkg.in/ini.v1 v1.61.0 // indirect
gotest.tools/gotestsum v1.8.1 // indirect
)
12 changes: 0 additions & 12 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,6 @@ github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO
github.com/hashicorp/mdns v1.0.0/go.mod h1:tL+uN++7HEJ6SQLQ2/p+z2pH24WQKWjBPkE0mNTz8vQ=
github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I=
github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc=
github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU=
github.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NHg9XEKhtSvM=
github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8=
github.com/jcmturner/aescts/v2 v2.0.0 h1:9YKLH6ey7H4eDBXW8khjYslgyqG2xZikXP0EQFKrle8=
Expand Down Expand Up @@ -218,9 +217,6 @@ github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3Rllmb
github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U=
github.com/nishanths/predeclared v0.0.0-20200524104333-86fad755b4d3/go.mod h1:nt3d53pc1VYcphSCIaYAJtnPYnr3Zyn8fMq2wvPGPso=
github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U=
github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
github.com/onsi/ginkgo v1.8.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY=
github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc=
github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic=
github.com/pelletier/go-toml v1.8.1 h1:1Nf83orprkJyknT6h7zbuEGUEjcyVlCxSUGTENmNCRM=
Expand Down Expand Up @@ -350,7 +346,6 @@ golang.org/x/mod v0.3.0 h1:RM4zey1++hCTbCVQfnWeKs9/IEsaBLA8vTkd0WVtmH4=
golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20181023162649-9b4f9f5ad519/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20181201002055-351d144fa1fc/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
Expand Down Expand Up @@ -381,14 +376,12 @@ golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJ
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9 h1:SQFwaSi55rU7vdNs9Yr0Z324VNlrF+0wMqRXT4St8ck=
golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20220513210516-0976fa681c29 h1:w8s32wxx3sY+OjLlv9qltkLU5yvJzxjjgiHWLjdIcw4=
golang.org/x/sync v0.0.0-20220513210516-0976fa681c29/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20181026203630-95b1ffbd15a5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
Expand Down Expand Up @@ -490,16 +483,13 @@ google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2
google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
google.golang.org/protobuf v1.25.1-0.20200805231151-a709e31e5d12 h1:OwhZOOMuf7leLaSCuxtQ9FW7ui2L2L6UKOtKAUqovUQ=
google.golang.org/protobuf v1.25.1-0.20200805231151-a709e31e5d12/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c=
gopkg.in/airbrake/gobrake.v2 v2.0.9/go.mod h1:/h5ZAUhDkGaJfjzjKLSjv6zCL6O0LLBxU4K+aSYdM/U=
gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk=
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q=
gopkg.in/errgo.v2 v2.1.0 h1:0vLT13EuvQ0hNvakwLuFZ/jYrLp5F3kcWHXdRggjCE8=
gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI=
gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys=
gopkg.in/gemnasium/logrus-airbrake-hook.v2 v2.1.2/go.mod h1:Xk6kEKp8OKb+X14hQBKWaSkCsqBpgog8nAV2xsGOxlo=
gopkg.in/ini.v1 v1.51.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k=
gopkg.in/ini.v1 v1.61.0 h1:LBCdW4FmFYL4s/vDZD1RQYX7oAR6IjujCYgMdbHBR10=
gopkg.in/ini.v1 v1.61.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k=
Expand All @@ -515,8 +505,6 @@ gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b h1:h8qDotaEPuJATrMmW04NCwg7v22aHH28wwpauUhK9Oo=
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gotest.tools/gotestsum v1.7.0 h1:RwpqwwFKBAa2h+F6pMEGpE707Edld0etUD3GhqqhDNc=
gotest.tools/gotestsum v1.7.0/go.mod h1:V1m4Jw3eBerhI/A6qCxUE07RnCg7ACkKj9BYcAm09V8=
gotest.tools/gotestsum v1.8.1 h1:C6dYd5K39WAv52jikEUuWgyMqJDhY90eauUjsFzwluc=
gotest.tools/gotestsum v1.8.1/go.mod h1:ctqdxBSCPv80kAFjYvFNpPntBrE5HAQnLiOKBGLmOBs=
gotest.tools/v3 v3.0.3/go.mod h1:Z7Lb0S5l+klDB31fvDQX8ss/FlKDxtlFlw3Oa8Ymbl8=
Expand Down
4 changes: 2 additions & 2 deletions internal/common-operation.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"crypto/tls"
"crypto/x509"
"fmt"
"io/ioutil"
"os"
"os/user"
"regexp"
"strings"
Expand Down Expand Up @@ -236,7 +236,7 @@ func setupTLSConfig(tlsConfig TLSConfig) (*tls.Config, error) {
}

if tlsConfig.CA != "" {
caString, err := ioutil.ReadFile(tlsConfig.CA)
caString, err := os.ReadFile(tlsConfig.CA)
if err != nil {
return nil, err
}
Expand Down
5 changes: 2 additions & 3 deletions internal/docs-operation.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package internal

import (
"bytes"
"io/ioutil"
"os"
"path/filepath"
"regexp"
Expand Down Expand Up @@ -55,7 +54,7 @@ func (operation *DocsOperation) GenerateDocs(rootCmd *cobra.Command, flags DocsF

func generateSinglePage(flags DocsFlags) error {

files, err := ioutil.ReadDir(flags.Directory)
files, err := os.ReadDir(flags.Directory)
if err != nil {
return errors.Wrap(err, "unable to read files in directory")
}
Expand All @@ -80,7 +79,7 @@ func generateSinglePage(flags DocsFlags) error {
}

filename := filepath.Join(flags.Directory, f.Name())
bytes, err := ioutil.ReadFile(filename)
bytes, err := os.ReadFile(filename)

content := string(bytes)

Expand Down
3 changes: 1 addition & 2 deletions internal/helpers/protobuf/protobuf.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package protobuf

import (
"io/ioutil"
"os"
"path/filepath"

Expand Down Expand Up @@ -71,7 +70,7 @@ func appendProtosets(descs []*desc.FileDescriptor, protosetFiles []string) []*de
for _, protosetFile := range protosetFiles {
var files descriptorpb.FileDescriptorSet

b, err := ioutil.ReadFile(protosetFile)
b, err := os.ReadFile(protosetFile)
if err != nil {
output.Warnf("Read protoset file %s failed: %s", protosetFile, err)
continue
Expand Down
6 changes: 3 additions & 3 deletions output/output.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,16 @@ package output
import (
"encoding/json"
"fmt"
"io/ioutil"
"io"
"log"
"os"

"github.com/pkg/errors"
"gopkg.in/yaml.v2"
)

var DebugLogger StdLogger = log.New(ioutil.Discard, "[kafkactl] ", log.LstdFlags)
var TestLogger StdLogger = log.New(ioutil.Discard, "[test ] ", log.LstdFlags)
var DebugLogger StdLogger = log.New(io.Discard, "[kafkactl] ", log.LstdFlags)
var TestLogger StdLogger = log.New(io.Discard, "[test ] ", log.LstdFlags)

// StdLogger is used to log error messages.
type StdLogger interface {
Expand Down

0 comments on commit 94db541

Please sign in to comment.