mirror of
https://github.com/sot-tech/mochi.git
synced 2026-07-28 10:08:11 -07:00
Fix lint gosec and ifshort issues
This commit is contained in:
@@ -4,7 +4,7 @@ import (
|
||||
"math/rand"
|
||||
"testing"
|
||||
|
||||
_ "github.com/sot-tech/mochi/pkg/rand_seed"
|
||||
_ "github.com/sot-tech/mochi/pkg/randseed"
|
||||
"github.com/stretchr/testify/require"
|
||||
)
|
||||
|
||||
|
||||
@@ -54,7 +54,7 @@ func build(confBytes []byte, st storage.Storage) (container.Container, error) {
|
||||
for _, hashString := range c.HashList {
|
||||
ih, err := bittorrent.NewInfoHash(hashString)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("whitelist : %s : %v", hashString, err)
|
||||
return nil, fmt.Errorf("whitelist : %s : %w", hashString, err)
|
||||
}
|
||||
init = append(init, storage.Pair{Left: ih.RawString(), Right: DUMMY})
|
||||
if len(ih) == bittorrent.InfoHashV2Len {
|
||||
|
||||
Reference in New Issue
Block a user