test
This commit is contained in:
parent
b2c5eaa754
commit
97951ffeab
3
bot.go
3
bot.go
@ -4,7 +4,6 @@ import (
|
|||||||
"bytes"
|
"bytes"
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"fmt"
|
"fmt"
|
||||||
"io/ioutil"
|
|
||||||
"log"
|
"log"
|
||||||
"regexp"
|
"regexp"
|
||||||
"strconv"
|
"strconv"
|
||||||
@ -289,7 +288,7 @@ func botMsgLoad(m *tb.Message) {
|
|||||||
r, err := b.GetFile(&f)
|
r, err := b.GetFile(&f)
|
||||||
logOnError(err, "botMsgLoad : GetFile")
|
logOnError(err, "botMsgLoad : GetFile")
|
||||||
buf := new(bytes.Buffer)
|
buf := new(bytes.Buffer)
|
||||||
n, err := buf.ReadFrom(r.Reader)
|
n, err := buf.ReadFrom(r)
|
||||||
logOnError(err, "botMsgLoad : ReadFrom")
|
logOnError(err, "botMsgLoad : ReadFrom")
|
||||||
if n > 0 {
|
if n > 0 {
|
||||||
data := buf.Bytes()
|
data := buf.Bytes()
|
||||||
|
Loading…
Reference in New Issue
Block a user