aboutsummaryrefslogtreecommitdiffstats
path: root/example_test.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 /example_test.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 'example_test.go')
-rw-r--r--example_test.go7
1 files changed, 3 insertions, 4 deletions
diff --git a/example_test.go b/example_test.go
index bba2961..27ea4a2 100644
--- a/example_test.go
+++ b/example_test.go
@@ -3,7 +3,6 @@ package git_test
import (
"fmt"
"io"
- "io/ioutil"
"log"
"os"
"path/filepath"
@@ -44,7 +43,7 @@ func ExampleClone() {
func ExamplePlainClone() {
// Tempdir to clone the repository
- dir, err := ioutil.TempDir("", "clone-example")
+ dir, err := os.MkdirTemp("", "clone-example")
if err != nil {
log.Fatal(err)
}
@@ -72,7 +71,7 @@ func ExamplePlainClone() {
func ExamplePlainClone_usernamePassword() {
// Tempdir to clone the repository
- dir, err := ioutil.TempDir("", "clone-example")
+ dir, err := os.MkdirTemp("", "clone-example")
if err != nil {
log.Fatal(err)
}
@@ -95,7 +94,7 @@ func ExamplePlainClone_usernamePassword() {
func ExamplePlainClone_accessToken() {
// Tempdir to clone the repository
- dir, err := ioutil.TempDir("", "clone-example")
+ dir, err := os.MkdirTemp("", "clone-example")
if err != nil {
log.Fatal(err)
}