v.0.11.0 upgrade dependencies

This commit is contained in:
Bora M. Alper 2020-02-22 16:11:42 +00:00
parent 25b3e8a9aa
commit 1f654b5404
No known key found for this signature in database
GPG Key ID: 8F1A9504E1BD114D
4 changed files with 25 additions and 19 deletions

View File

@ -56,7 +56,7 @@ func main() {
return return
} }
zap.L().Info("magneticod v0.10.0 has been started.") zap.L().Info("magneticod v0.11.0 has been started.")
zap.L().Info("Copyright (C) 2017-2020 Mert Bora ALPER <bora@boramalper.org>.") zap.L().Info("Copyright (C) 2017-2020 Mert Bora ALPER <bora@boramalper.org>.")
zap.L().Info("Dedicated to Cemile Binay, in whose hands I thrived.") zap.L().Info("Dedicated to Cemile Binay, in whose hands I thrived.")
zap.S().Infof("Compiled on %s", compiledOn) zap.S().Infof("Compiled on %s", compiledOn)

View File

@ -13,17 +13,17 @@ import (
"strings" "strings"
"time" "time"
"golang.org/x/text/encoding/charmap"
"github.com/anacrolix/torrent" "github.com/anacrolix/torrent"
"github.com/anacrolix/torrent/storage" "github.com/anacrolix/torrent/storage"
"github.com/gorilla/mux" "github.com/gorilla/mux"
"go.uber.org/zap" "go.uber.org/zap"
"golang.org/x/text/encoding/charmap"
"github.com/boramalper/magnetico/pkg/persistence" "github.com/boramalper/magnetico/pkg/persistence"
) )
type ApiReadmeHandler struct { type ApiReadmeHandler struct {
client *torrent.Client client *torrent.Client
tempdir string tempdir string
} }
@ -97,9 +97,9 @@ func (h *ApiReadmeHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
zap.L().Warn("WAITING FOR INFO") zap.L().Warn("WAITING FOR INFO")
select { select {
case <- t.GotInfo(): case <-t.GotInfo():
case <- time.After(30 * time.Second): case <-time.After(30 * time.Second):
respondError(w, http.StatusInternalServerError, "Timeout") respondError(w, http.StatusInternalServerError, "Timeout")
return return
} }
@ -124,7 +124,7 @@ func (h *ApiReadmeHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
} }
// Cancel if the file is larger than 50 KiB // Cancel if the file is larger than 50 KiB
if file.Length() > 50 * 1024 { if file.Length() > 50*1024 {
w.WriteHeader(http.StatusRequestEntityTooLarge) w.WriteHeader(http.StatusRequestEntityTooLarge)
return return
} }

View File

@ -61,7 +61,7 @@ func main() {
defer logger.Sync() defer logger.Sync()
zap.ReplaceGlobals(logger) zap.ReplaceGlobals(logger)
zap.L().Info("magneticow v0.10.0 has been started.") zap.L().Info("magneticow v0.11.0 has been started.")
zap.L().Info("Copyright (C) 2017-2020 Mert Bora ALPER <bora@boramalper.org>.") zap.L().Info("Copyright (C) 2017-2020 Mert Bora ALPER <bora@boramalper.org>.")
zap.L().Info("Dedicated to Cemile Binay, in whose hands I thrived.") zap.L().Info("Dedicated to Cemile Binay, in whose hands I thrived.")
zap.S().Infof("Compiled on %s", compiledOn) zap.S().Infof("Compiled on %s", compiledOn)

30
go.mod
View File

@ -2,27 +2,33 @@ module github.com/boramalper/magnetico
require ( require (
github.com/Wessie/appdirs v0.0.0-20141031215813-6573e894f8e2 github.com/Wessie/appdirs v0.0.0-20141031215813-6573e894f8e2
github.com/anacrolix/missinggo v1.1.0 github.com/anacrolix/dht v1.0.1 // indirect
github.com/anacrolix/torrent v1.1.4 github.com/anacrolix/missinggo v1.2.1
github.com/anacrolix/missinggo/v2 v2.4.0 // indirect
github.com/anacrolix/torrent v1.14.0
github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e // indirect github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e // indirect
github.com/dustin/go-humanize v1.0.0 github.com/dustin/go-humanize v1.0.0
github.com/google/pprof v0.0.0-20190515194954-54271f7e092f // indirect github.com/google/pprof v0.0.0-20190515194954-54271f7e092f // indirect
github.com/gorilla/mux v1.7.2 github.com/gorilla/mux v1.7.4
github.com/gorilla/schema v1.1.0 github.com/gorilla/schema v1.1.0
github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6 // indirect github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6 // indirect
github.com/jessevdk/go-flags v1.4.0 github.com/jessevdk/go-flags v1.4.0
github.com/kevinburke/go-bindata v3.16.0+incompatible // indirect github.com/kevinburke/go-bindata v3.16.0+incompatible // indirect
github.com/libp2p/go-sockaddr v0.0.1 github.com/libp2p/go-sockaddr v0.0.1
github.com/mattn/go-sqlite3 v1.10.0 github.com/mattn/go-sqlite3 v2.0.3+incompatible
github.com/pkg/errors v0.8.1 github.com/pkg/errors v0.9.1
github.com/pkg/profile v1.3.0 github.com/pkg/profile v1.4.0
github.com/willf/bloom v2.0.3+incompatible github.com/willf/bloom v2.0.3+incompatible
go.uber.org/atomic v1.4.0 // indirect go.uber.org/atomic v1.5.1 // indirect
go.uber.org/multierr v1.1.0 // indirect go.uber.org/multierr v1.4.0 // indirect
go.uber.org/zap v1.10.0 go.uber.org/zap v1.14.0
golang.org/x/crypto v0.0.0-20190513172903-22d7a77e9e5f golang.org/x/crypto v0.0.0-20200221231518-2aa609cf4a9d
golang.org/x/sys v0.0.0-20190516110030-61b9204099cb golang.org/x/lint v0.0.0-20200130185559-910be7a94367 // indirect
golang.org/x/text v0.3.0 golang.org/x/net v0.0.0-20200222125558-5a598a2470a0 // indirect
golang.org/x/sys v0.0.0-20200219091948-cb0a6d8edb6c
golang.org/x/text v0.3.2
golang.org/x/tools v0.0.0-20200221224223-e1da425f72fd // indirect
honnef.co/go/tools v0.0.1-2020.1.3 // indirect
) )
go 1.13 go 1.13