Compare commits
3 Commits
Author | SHA1 | Date | |
---|---|---|---|
d9e1985d89 | |||
5df9cc4323 | |||
b03b9c9c12 |
4
go.mod
4
go.mod
@ -1,5 +1,5 @@
|
|||||||
module deadbeef.codes/steven/dipole
|
module deadbeef.codes/steven/dipole
|
||||||
|
|
||||||
go 1.20
|
go 1.22
|
||||||
|
|
||||||
require golang.org/x/sys v0.7.0
|
require golang.org/x/sys v0.21.0
|
||||||
|
4
go.sum
4
go.sum
@ -1,2 +1,2 @@
|
|||||||
golang.org/x/sys v0.7.0 h1:3jlCCIQZPdOYu1h8BkNvLz8Kgwtae2cagcG/VamtZRU=
|
golang.org/x/sys v0.21.0 h1:rF+pYz3DAGSQAxAu1CbC7catZg4ebC4UIeIhKxBZvws=
|
||||||
golang.org/x/sys v0.7.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
golang.org/x/sys v0.21.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
|
||||||
|
4
main.go
4
main.go
@ -3,7 +3,7 @@ package main
|
|||||||
import (
|
import (
|
||||||
"bufio"
|
"bufio"
|
||||||
"fmt"
|
"fmt"
|
||||||
"io/ioutil"
|
"io"
|
||||||
"log"
|
"log"
|
||||||
"net/http"
|
"net/http"
|
||||||
"net/url"
|
"net/url"
|
||||||
@ -74,7 +74,7 @@ func addRuTorrent(ruTorrentURL, magnetLink string) error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if resp.StatusCode != http.StatusOK {
|
if resp.StatusCode != http.StatusOK {
|
||||||
body, _ := ioutil.ReadAll(resp.Body)
|
body, _ := io.ReadAll(resp.Body)
|
||||||
defer resp.Body.Close()
|
defer resp.Body.Close()
|
||||||
fmt.Println(string(body))
|
fmt.Println(string(body))
|
||||||
return fmt.Errorf("unexpected HTTP status code '%d', expected '%d'", resp.StatusCode, http.StatusOK)
|
return fmt.Errorf("unexpected HTTP status code '%d', expected '%d'", resp.StatusCode, http.StatusOK)
|
||||||
|
Loading…
Reference in New Issue
Block a user