update dependencies and fix lint warnings

This commit is contained in:
Lawrence, Rendall
2026-02-18 18:12:58 +03:00
parent 36a9022ef4
commit 08686d74b7
18 changed files with 205 additions and 139 deletions
+8 -7
View File
@@ -120,13 +120,14 @@ func NewStore(cfg Config) (storage.PeerStorage, error) {
// Config holds the configuration of a redis PeerStorage.
type Config struct {
PeerLifetime time.Duration `cfg:"peer_lifetime"`
Addresses []string
TLS bool
CACerts []string `cfg:"ca_certs"`
DB int
PoolSize int `cfg:"pool_size"`
Login string
PeerLifetime time.Duration `cfg:"peer_lifetime"`
Addresses []string
TLS bool
CACerts []string `cfg:"ca_certs"`
DB int
PoolSize int `cfg:"pool_size"`
Login string
//nolint:gosec
Password string
Sentinel bool
SentinelMaster string `cfg:"sentinel_master"`
+2 -2
View File
@@ -27,14 +27,14 @@ type benchData struct {
}
func generateInfoHashes() (a [ihCount]bittorrent.InfoHash) {
for i := range a {
for i := range ihCount {
a[i] = randIH(i < ihCount/2)
}
return a
}
func generatePeers() (a [peersCount]bittorrent.Peer) {
for i := range a {
for i := range peersCount {
var ip []byte
if i%2 == 0 {
ip = make([]byte, net.IPv4len)