remove deprecated use of ioutil (#5205)

Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>

Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
This commit is contained in:
Jörn Friedrich Dreyer
2022-12-08 14:44:53 +01:00
committed by GitHub
parent 46cb910637
commit 53d15d329e
24 changed files with 57 additions and 67 deletions
+2 -2
View File
@@ -2,7 +2,7 @@ package revaconfig
import (
"encoding/json"
"io/ioutil"
"os"
"strings"
"github.com/owncloud/ocis/v2/ocis-pkg/log"
@@ -111,7 +111,7 @@ func spacesProviders(cfg *config.Config, logger log.Logger) map[string]map[strin
// check if the rules have to be read from a json file
if cfg.StorageRegistry.JSON != "" {
data, err := ioutil.ReadFile(cfg.StorageRegistry.JSON)
data, err := os.ReadFile(cfg.StorageRegistry.JSON)
if err != nil {
logger.Error().Err(err).Msg("Failed to read storage registry rules from JSON file: " + cfg.StorageRegistry.JSON)
return nil