Skip to content

Commit

Permalink
Replace deprecated ioutil (pquerna#91)
Browse files Browse the repository at this point in the history
  • Loading branch information
erfan-khadem authored Nov 30, 2023
1 parent 87d222c commit 3357de7
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions example/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import (
"encoding/base32"
"fmt"
"image/png"
"io/ioutil"
"os"
"time"
)
Expand All @@ -19,7 +18,7 @@ func display(key *otp.Key, data []byte) {
fmt.Printf("Account Name: %s\n", key.AccountName())
fmt.Printf("Secret: %s\n", key.Secret())
fmt.Println("Writing PNG to qr-code.png....")
ioutil.WriteFile("qr-code.png", data, 0644)
os.WriteFile("qr-code.png", data, 0644)
fmt.Println("")
fmt.Println("Please add your TOTP to your OTP Application now!")
fmt.Println("")
Expand Down

0 comments on commit 3357de7

Please sign in to comment.