Remove deprecated ioutil functions
This commit is contained in:
parent
537c005643
commit
2cc6dc2458
2 changed files with 3 additions and 5 deletions
|
@ -1,7 +1,6 @@
|
|||
package tgbotapi
|
||||
|
||||
import (
|
||||
"io/ioutil"
|
||||
"net/http"
|
||||
"os"
|
||||
"testing"
|
||||
|
@ -139,7 +138,7 @@ func TestSendWithNewPhoto(t *testing.T) {
|
|||
func TestSendWithNewPhotoWithFileBytes(t *testing.T) {
|
||||
bot, _ := getBot(t)
|
||||
|
||||
data, _ := ioutil.ReadFile("tests/image.jpg")
|
||||
data, _ := os.ReadFile("tests/image.jpg")
|
||||
b := FileBytes{Name: "image.jpg", Bytes: data}
|
||||
|
||||
msg := NewPhoto(ChatID, b)
|
||||
|
@ -195,7 +194,7 @@ func TestSendNewPhotoToChannel(t *testing.T) {
|
|||
func TestSendNewPhotoToChannelFileBytes(t *testing.T) {
|
||||
bot, _ := getBot(t)
|
||||
|
||||
data, _ := ioutil.ReadFile("tests/image.jpg")
|
||||
data, _ := os.ReadFile("tests/image.jpg")
|
||||
b := FileBytes{Name: "image.jpg", Bytes: data}
|
||||
|
||||
msg := NewPhotoToChannel(Channel, b)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue