Skip to content

Commit

Permalink
Remove dependence on io/ioutil, update Go to 1.21 (#54)
Browse files Browse the repository at this point in the history
  • Loading branch information
donatwork authored Aug 23, 2023
1 parent ebf936b commit fac0ec2
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/dell/csm-metrics-powerstore

go 1.20
go 1.21

require (
github.com/dell/gocsi v1.7.0
Expand Down
1 change: 1 addition & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,7 @@ github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:
github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc=
github.com/imdario/mergo v0.3.5/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA=
github.com/jarcoal/httpmock v1.2.0 h1:gSvTxxFR/MEMfsGrvRbdfpRUMBStovlSRLw0Ep1bwwc=
github.com/jarcoal/httpmock v1.2.0/go.mod h1:oCoTsnAz4+UoOUIf5lJOWV2QQIW5UoeUI6aM2YnWAZk=
github.com/jcmturner/aescts/v2 v2.0.0/go.mod h1:AiaICIRyfYg35RUkr8yESTqvSy7csK90qZ5xfvvsoNs=
github.com/jcmturner/dnsutils/v2 v2.0.0/go.mod h1:b0TnjGOvI/n42bZa+hmXL+kFJZsFT7G4t3HTlQ184QM=
github.com/jcmturner/gofork v1.0.0/go.mod h1:MK8+TM0La+2rjBD4jE12Kj1pCCxK7d2LK/UM3ncEo0o=
Expand Down
4 changes: 2 additions & 2 deletions internal/common/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import (
"context"
"errors"
"fmt"
"io/ioutil"
"os"
"path/filepath"
"regexp"
"strconv"
Expand Down Expand Up @@ -48,7 +48,7 @@ func GetPowerStoreArrays(filePath string, logger *logrus.Logger) (map[string]*se
Arrays []*service.PowerStoreArray `yaml:"arrays"`
}

data, err := ioutil.ReadFile(filepath.Clean(filePath))
data, err := os.ReadFile(filepath.Clean(filePath))
if err != nil {
logger.WithError(err).Errorf("cannot read file %s", filePath)
return nil, nil, nil, err
Expand Down
4 changes: 2 additions & 2 deletions opentelemetry/tracers/zipkin_tracer.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ package tracer

import (
"context"
"io/ioutil"
"io"
"strings"

"go.opentelemetry.io/otel"
Expand All @@ -36,7 +36,7 @@ func InitTracing(uri string, prob float64) (trace.TracerProvider, error) {
}
exporter, err := zipkin.New(
uri,
zipkin.WithLogger(stdLog.New(ioutil.Discard, "", stdLog.LstdFlags)),
zipkin.WithLogger(stdLog.New(io.Discard, "", stdLog.LstdFlags)),
)
if err != nil {
return nil, err
Expand Down

0 comments on commit fac0ec2

Please sign in to comment.