Skip to content

Commit

Permalink
Merge pull request #29 from Sioro-Neoku/go-1.6
Browse files Browse the repository at this point in the history
Test against go 1.6
  • Loading branch information
Sioro-Neoku committed Mar 28, 2016
2 parents 2cf9553 + 4ffb8d8 commit 5b0afec
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
4 changes: 3 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
sudo: false
language: go
go: 1.5
go:
- 1.5
- 1.6
install:
- go get
- go get github.com/alecthomas/gometalinter
Expand Down
10 changes: 5 additions & 5 deletions client.go
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ func (c *Client) addBlocklist() {
return
}
defer func() {
if err := in.Close(); err != nil {
if err = in.Close(); err != nil {
log.Printf("Error closing the blocklist gzip file: %s", err)
}
}()
Expand All @@ -143,7 +143,7 @@ func (c *Client) addBlocklist() {
return
}
defer func() {
if err := out.Close(); err != nil {
if err = out.Close(); err != nil {
log.Printf("Error writing the blocklist file: %s", err)
}
}()
Expand Down Expand Up @@ -278,12 +278,12 @@ func (c Client) percentage() float64 {

func downloadFile(URL string) (fileName string, err error) {
var file *os.File
if file, err = ioutil.TempFile(os.TempDir(), "torrent-imageviewer"); err != nil {
if file, err = ioutil.TempFile(os.TempDir(), "go-peerflix"); err != nil {
return
}

defer func() {
if err := file.Close(); err != nil {
if err = file.Close(); err != nil {
log.Printf("Error closing torrent file: %s", err)
}
}()
Expand All @@ -294,7 +294,7 @@ func downloadFile(URL string) (fileName string, err error) {
}

defer func() {
if err := response.Body.Close(); err != nil {
if err = response.Body.Close(); err != nil {
log.Printf("Error closing torrent file: %s", err)
}
}()
Expand Down

0 comments on commit 5b0afec

Please sign in to comment.