From b118baae8660aa09170fb270501e453d4fc9ce4e Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Wed, 10 Aug 2022 09:20:57 +0200 Subject: [PATCH] cmd/gaiad/cmd: replace deprecated ioutil with os.WriteFile (backport #1660) (#1661) * cmd/gaiad/cmd: replace deprecated ioutil with os.WriteFile (#1660) Fixes a problem reported by the linters that ioutil.WriteFile is deprecated hence we should use os.WriteFile. (cherry picked from commit 6ac473a4d4391ee4023f0e7bca21814895c4a733) # Conflicts: # cmd/gaiad/cmd/testnet.go * Mergify mangled the code with git markers - removed those Co-authored-by: Emmanuel T Odeke Co-authored-by: Milan Mulji <98309852+mmulji-ic@users.noreply.github.com> --- cmd/gaiad/cmd/testnet.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/gaiad/cmd/testnet.go b/cmd/gaiad/cmd/testnet.go index b8d01f9b1e8..8bccfd34966 100644 --- a/cmd/gaiad/cmd/testnet.go +++ b/cmd/gaiad/cmd/testnet.go @@ -400,7 +400,7 @@ func writeFile(name string, dir string, contents []byte) error { return err } - err = tmos.WriteFile(file, contents, 0o644) + err = os.WriteFile(file, contents, 0o600) if err != nil { return err }