all: Unused parameter should be replaced by underscore (#8464)
Co-authored-by: deepsource-autofix[bot] <62050782+deepsource-autofix[bot]@users.noreply.github.com>
This commit is contained in:
co-authored by
deepsource-autofix[bot] <62050782+deepsource-autofix[bot]@users.noreply.github.com>
parent
7bdb5faa9c
commit
5130c414da
@@ -167,15 +167,15 @@ func negotiateTLS(cert tls.Certificate, conn0, conn1 net.Conn) (net.Conn, net.Co
|
||||
|
||||
type fakeModel struct{}
|
||||
|
||||
func (m *fakeModel) Index(deviceID DeviceID, folder string, files []FileInfo) error {
|
||||
func (m *fakeModel) Index(_ DeviceID, _ string, _ []FileInfo) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *fakeModel) IndexUpdate(deviceID DeviceID, folder string, files []FileInfo) error {
|
||||
func (m *fakeModel) IndexUpdate(_ DeviceID, _ string, _ []FileInfo) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *fakeModel) Request(deviceID DeviceID, folder, name string, blockNo, size int32, offset int64, hash []byte, weakHash uint32, fromTemporary bool) (RequestResponse, error) {
|
||||
func (m *fakeModel) Request(_ DeviceID, _, _ string, _, size int32, offset int64, _ []byte, _ uint32, _ bool) (RequestResponse, error) {
|
||||
// We write the offset to the end of the buffer, so the receiver
|
||||
// can verify that it did in fact get some data back over the
|
||||
// connection.
|
||||
@@ -184,13 +184,13 @@ func (m *fakeModel) Request(deviceID DeviceID, folder, name string, blockNo, siz
|
||||
return &fakeRequestResponse{buf}, nil
|
||||
}
|
||||
|
||||
func (m *fakeModel) ClusterConfig(deviceID DeviceID, config ClusterConfig) error {
|
||||
func (m *fakeModel) ClusterConfig(_ DeviceID, _ ClusterConfig) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *fakeModel) Closed(DeviceID, error) {
|
||||
}
|
||||
|
||||
func (m *fakeModel) DownloadProgress(deviceID DeviceID, folder string, updates []FileDownloadProgressUpdate) error {
|
||||
func (m *fakeModel) DownloadProgress(_ DeviceID, _ string, _ []FileDownloadProgressUpdate) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -32,11 +32,11 @@ func (t *TestModel) Index(deviceID DeviceID, folder string, files []FileInfo) er
|
||||
return nil
|
||||
}
|
||||
|
||||
func (t *TestModel) IndexUpdate(deviceID DeviceID, folder string, files []FileInfo) error {
|
||||
func (t *TestModel) IndexUpdate(_ DeviceID, _ string, _ []FileInfo) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (t *TestModel) Request(deviceID DeviceID, folder, name string, blockNo, size int32, offset int64, hash []byte, weakHash uint32, fromTemporary bool) (RequestResponse, error) {
|
||||
func (t *TestModel) Request(_ DeviceID, folder, name string, _, size int32, offset int64, hash []byte, weakHash uint32, fromTemporary bool) (RequestResponse, error) {
|
||||
t.folder = folder
|
||||
t.name = name
|
||||
t.offset = offset
|
||||
|
||||
Reference in New Issue
Block a user