example: Replace interface{}
with any
Signed-off-by: Thomas Hipp <thomashipp@gmail.com>
This commit is contained in:
parent
ceaf2b184d
commit
cb2aa5c0f8
3 changed files with 15 additions and 15 deletions
|
@ -125,7 +125,7 @@ func main() {
|
|||
testURL := r.Form.Get("url")
|
||||
var data struct {
|
||||
URL string
|
||||
Response interface{}
|
||||
Response any
|
||||
}
|
||||
if testURL != "" {
|
||||
data.URL = testURL
|
||||
|
@ -149,7 +149,7 @@ func main() {
|
|||
logrus.Fatal(http.ListenAndServe("127.0.0.1:"+port, nil))
|
||||
}
|
||||
|
||||
func callExampleEndpoint(client *http.Client, testURL string) (interface{}, error) {
|
||||
func callExampleEndpoint(client *http.Client, testURL string) (any, error) {
|
||||
req, err := http.NewRequest("GET", testURL, nil)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue