Skip to content

Commit 3357de7

Browse files
authored
Replace deprecated ioutil (#91)
1 parent 87d222c commit 3357de7

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

Diff for: example/main.go

+1-2
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ import (
99
"encoding/base32"
1010
"fmt"
1111
"image/png"
12-
"io/ioutil"
1312
"os"
1413
"time"
1514
)
@@ -19,7 +18,7 @@ func display(key *otp.Key, data []byte) {
1918
fmt.Printf("Account Name: %s\n", key.AccountName())
2019
fmt.Printf("Secret: %s\n", key.Secret())
2120
fmt.Println("Writing PNG to qr-code.png....")
22-
ioutil.WriteFile("qr-code.png", data, 0644)
21+
os.WriteFile("qr-code.png", data, 0644)
2322
fmt.Println("")
2423
fmt.Println("Please add your TOTP to your OTP Application now!")
2524
fmt.Println("")

0 commit comments

Comments
 (0)