aboutsummaryrefslogtreecommitdiffstats
path: root/_examples/sha256/main.go
diff options
context:
space:
mode:
authorPaulo Gomes <pjbgf@linux.com>2023-05-11 21:59:37 +0100
committerPaulo Gomes <pjbgf@linux.com>2023-05-11 21:59:37 +0100
commit096b3cc16b547f3c0d6e4f92046945bcfac0fa14 (patch)
treedf3e5f5265aac52a6683be10d74561e26e70cb0c /_examples/sha256/main.go
parent9dfaf6acd8e3aa1c85bcce7d45f8e8c6b908319c (diff)
downloadgo-git-096b3cc16b547f3c0d6e4f92046945bcfac0fa14.tar.gz
*: Remove use of deprecated io/util
Signed-off-by: Paulo Gomes <pjbgf@linux.com>
Diffstat (limited to '_examples/sha256/main.go')
-rw-r--r--_examples/sha256/main.go3
1 files changed, 1 insertions, 2 deletions
diff --git a/_examples/sha256/main.go b/_examples/sha256/main.go
index 2a257e8..e1772d2 100644
--- a/_examples/sha256/main.go
+++ b/_examples/sha256/main.go
@@ -2,7 +2,6 @@ package main
import (
"fmt"
- "io/ioutil"
"os"
"path/filepath"
"time"
@@ -34,7 +33,7 @@ func main() {
// worktree of the project using the go standard library.
Info("echo \"hello world!\" > example-git-file")
filename := filepath.Join(directory, "example-git-file")
- err = ioutil.WriteFile(filename, []byte("hello world!"), 0644)
+ err = os.WriteFile(filename, []byte("hello world!"), 0644)
CheckIfError(err)
// Adds the new file to the staging area.