Skip to content

Commit 95b7836

Browse files
author
Syfaro
committed
Remove deprecated methods.
1 parent a7f8b9c commit 95b7836

File tree

1 file changed

+1
-12
lines changed

1 file changed

+1
-12
lines changed

configs.go

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ package tgbotapi
33
import (
44
"encoding/json"
55
"io"
6-
"log"
76
"net/url"
87
"strconv"
98
)
@@ -91,7 +90,6 @@ func (chat *BaseChat) values() (url.Values, error) {
9190
// BaseFile is a base type for all file config types.
9291
type BaseFile struct {
9392
BaseChat
94-
FilePath string
9593
File interface{}
9694
FileID string
9795
UseExisting bool
@@ -135,16 +133,7 @@ func (file BaseFile) params() (map[string]string, error) {
135133

136134
// getFile returns the file.
137135
func (file BaseFile) getFile() interface{} {
138-
var result interface{}
139-
if file.FilePath == "" {
140-
result = file.File
141-
} else {
142-
log.Println("FilePath is deprecated.")
143-
log.Println("Please use BaseFile.File instead.")
144-
result = file.FilePath
145-
}
146-
147-
return result
136+
return file.File
148137
}
149138

150139
// useExistingFile returns if the BaseFile has already been uploaded.

0 commit comments

Comments
 (0)