Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions cmd/driver/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (
"go.uber.org/zap"
"go.uber.org/zap/zapcore"
"gopkg.in/natefinch/lumberjack.v2"
"io/ioutil"
"io"
"log"
"os"
"strings"
Expand Down Expand Up @@ -208,7 +208,7 @@ func main() {
// disable the console logging (if anywhere else being done by softlayer or any other pkg)
// presently softlayer logs few warning message, which makes the flexdriver unmarshall failure
log.SetFlags(0)
log.SetOutput(ioutil.Discard)
log.SetOutput(io.Discard)

// Divert all loggers outputs and fmt.printf loggings (this will create issues with flex response)
NullDevice, _ := os.Open(os.DevNull)
Expand Down
3 changes: 1 addition & 2 deletions driver/driver.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ import (
"github.com/IBM/ibmcloud-object-storage-plugin/utils/backend"
"github.com/IBM/ibmcloud-object-storage-plugin/utils/parser"
"go.uber.org/zap"
"io/ioutil"
"os"
"os/exec"
"path"
Expand Down Expand Up @@ -54,7 +53,7 @@ var (
stat = os.Stat
unmount = syscall.Unmount
mount = syscall.Mount
writeFile = ioutil.WriteFile
writeFile = os.WriteFile
mkdirAll = os.MkdirAll
removeAll = os.RemoveAll
//hostname, anyerror = os.Hostname()
Expand Down
4 changes: 2 additions & 2 deletions driver/driver_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import (
"github.com/IBM/ibmcloud-object-storage-plugin/utils/parser"
"github.com/stretchr/testify/assert"
"go.uber.org/zap"
"io/ioutil"
"io"
"os"
"os/exec"
"path"
Expand Down Expand Up @@ -116,7 +116,7 @@ func getPlugin() *S3fsPlugin {
ret := exec.Command(os.Args[0], cs...)
ret.Env = []string{"GO_WANT_HELPER_PROCESS=1"}
if commandFailure {
ret.Stdout = ioutil.Discard
ret.Stdout = io.Discard
}
return ret
}
Expand Down
3 changes: 1 addition & 2 deletions provisioner/ibm-s3fs-provisioner.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ import (
"github.com/IBM/ibmcloud-object-storage-plugin/utils/uuid"
"go.uber.org/zap"
"google.golang.org/grpc"
"io/ioutil"
"k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/client-go/kubernetes"
Expand Down Expand Up @@ -133,7 +132,7 @@ type IBMS3fsProvisioner struct {
}

var _ controller.Provisioner = &IBMS3fsProvisioner{}
var writeFile = ioutil.WriteFile
var writeFile = os.WriteFile

func UnixConnect(addr string, t time.Duration) (net.Conn, error) {
unix_addr, _ := net.ResolveUnixAddr("unix", addr)
Expand Down