diff --git a/dfget/core/uploader/peer_server_test.go b/dfget/core/uploader/peer_server_test.go index f5f2f6f16..b07308ca8 100644 --- a/dfget/core/uploader/peer_server_test.go +++ b/dfget/core/uploader/peer_server_test.go @@ -53,9 +53,8 @@ var ( ) type PeerServerTestSuite struct { - workHome string - servicePath string - srv *peerServer + workHome string + srv *peerServer } func (s *PeerServerTestSuite) SetUpSuite(c *check.C) { diff --git a/dfget/core/uploader/uploader_helper_test.go b/dfget/core/uploader/uploader_helper_test.go index f45b08d67..5684d934f 100644 --- a/dfget/core/uploader/uploader_helper_test.go +++ b/dfget/core/uploader/uploader_helper_test.go @@ -126,18 +126,6 @@ func (u uploadHeader) newRange(rangeStr string) uploadHeader { return newU } -func (u uploadHeader) newNum(num int) uploadHeader { - newU := u - newU.num = fmt.Sprintf("%d", num) - return newU -} - -func (u uploadHeader) newSize(size int) uploadHeader { - newU := u - newU.size = fmt.Sprintf("%d", size) - return newU -} - // ---------------------------------------------------------------------------- // upload param diff --git a/dfget/core/uploader/uploader_util_test.go b/dfget/core/uploader/uploader_util_test.go index f30a1a9be..8e448b059 100644 --- a/dfget/core/uploader/uploader_util_test.go +++ b/dfget/core/uploader/uploader_util_test.go @@ -36,7 +36,6 @@ func init() { type UploaderUtilTestSuite struct { workHome string - host string ip string port int server *http.Server diff --git a/supernode/daemon/mgr/progress/state_sync_map.go b/supernode/daemon/mgr/progress/state_sync_map.go index cde3a47fe..78583f7bf 100644 --- a/supernode/daemon/mgr/progress/state_sync_map.go +++ b/supernode/daemon/mgr/progress/state_sync_map.go @@ -102,20 +102,6 @@ func (mmap *stateSyncMap) getAsPieceState(key string) (*pieceState, error) { return nil, errors.Wrapf(errortypes.ErrConvertFailed, "key %s: %v", key, v) } -// getAsSuperLoadState returns result as *superLoadState. -// The ErrConvertFailed error will be returned if the assertion fails. -func (mmap *stateSyncMap) getAsSuperLoadState(key string) (*superLoadState, error) { - v, err := mmap.get(key) - if err != nil { - return nil, errors.Wrapf(err, "key: %s", key) - } - - if value, ok := v.(*superLoadState); ok { - return value, nil - } - return nil, errors.Wrapf(errortypes.ErrConvertFailed, "key %s: %v", key, v) -} - // remove deletes the key-value pair from the mmap. // The ErrEmptyValue error will be returned if the key is empty. // And the ErrDataNotFound error will be returned if the key cannot be found.