From 9cffc45f0347e5c8b801c151955fa9326b9b2ba7 Mon Sep 17 00:00:00 2001 From: Moritz Poldrack Date: Wed, 17 Aug 2022 16:19:45 +0200 Subject: go: removed io/ioutil Since the minimum required version of Go has been bumped to 1.16, the deprecation of io/ioutil can now be acted upon. This Commit removes the remaining dependencies on ioutil and replaces them with their io or os counterparts. Signed-off-by: Moritz Poldrack Acked-by: Robin Jarry --- config/config.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'config/config.go') diff --git a/config/config.go b/config/config.go index 66c6dd19..c6fe70ee 100644 --- a/config/config.go +++ b/config/config.go @@ -3,7 +3,6 @@ package config import ( "errors" "fmt" - "io/ioutil" "log" "net/url" "os" @@ -407,7 +406,7 @@ func installTemplate(root, name string) error { } var data []byte for _, dir := range searchDirs { - data, err = ioutil.ReadFile(path.Join(dir, name)) + data, err = os.ReadFile(path.Join(dir, name)) if err == nil { break } @@ -415,7 +414,7 @@ func installTemplate(root, name string) error { if err != nil { return err } - err = ioutil.WriteFile(path.Join(root, name), data, 0o644) + err = os.WriteFile(path.Join(root, name), data, 0o644) if err != nil { return err } -- cgit