Replace deprecated lib usage

This commit is contained in:
LG 2025-07-21 19:53:08 -03:00
parent 450dab19b7
commit 3f4d33cd8c

View file

@ -6,7 +6,6 @@ package googledrive
import ( import (
"context" "context"
"fmt" "fmt"
"io/ioutil"
"os" "os"
"path/filepath" "path/filepath"
"strings" "strings"
@ -38,8 +37,8 @@ type Config struct {
// NewStorageBackend creates and initializes a new Google Drive storage backend. // NewStorageBackend creates and initializes a new Google Drive storage backend.
func NewStorageBackend(opts Config, logFunc storage.Log) (storage.Backend, error) { func NewStorageBackend(opts Config, logFunc storage.Log) (storage.Backend, error) {
ctx := context.Background() ctx := context.Background()
b, err := ioutil.ReadFile(opts.CredentialsJSON) b, err := os.ReadFile(opts.CredentialsJSON)
if err != nil { if err != nil {
return nil, errwrap.Wrap(err, "unable to read credentials") return nil, errwrap.Wrap(err, "unable to read credentials")
} }