mirror of
https://github.com/octoleo/syncthing.git
synced 2025-01-03 07:12:27 +00:00
all: fix unused method receiver (#8988)
refactor: fix unused method receiver Methods with unused receivers can be a symptom of unfinished refactoring or a bug. To keep the same method signature, omit the receiver name or '_' as it is unused. Co-authored-by: deepsource-autofix[bot] <62050782+deepsource-autofix[bot]@users.noreply.github.com>
This commit is contained in:
parent
24e230d455
commit
f23c41221b
@ -214,7 +214,7 @@ func (t *tcpListener) Factory() listenerFactory {
|
||||
return t.factory
|
||||
}
|
||||
|
||||
func (t *tcpListener) NATType() string {
|
||||
func (*tcpListener) NATType() string {
|
||||
return "unknown"
|
||||
}
|
||||
|
||||
|
@ -241,9 +241,9 @@ func (s *fakeDiscoveryServer) handler(w http.ResponseWriter, r *http.Request) {
|
||||
|
||||
type fakeAddressLister struct{}
|
||||
|
||||
func (f *fakeAddressLister) ExternalAddresses() []string {
|
||||
func (*fakeAddressLister) ExternalAddresses() []string {
|
||||
return []string{"tcp://0.0.0.0:22000"}
|
||||
}
|
||||
func (f *fakeAddressLister) AllAddresses() []string {
|
||||
func (*fakeAddressLister) AllAddresses() []string {
|
||||
return []string{"tcp://0.0.0.0:22000", "tcp://192.168.0.1:22000"}
|
||||
}
|
||||
|
@ -167,11 +167,11 @@ func (m *manager) Lookup(ctx context.Context, deviceID protocol.DeviceID) (addre
|
||||
return addresses, nil
|
||||
}
|
||||
|
||||
func (m *manager) String() string {
|
||||
func (*manager) String() string {
|
||||
return "discovery cache"
|
||||
}
|
||||
|
||||
func (m *manager) Error() error {
|
||||
func (*manager) Error() error {
|
||||
return nil
|
||||
}
|
||||
|
||||
|
@ -229,7 +229,7 @@ func (c *alwaysChanged) Seen(fs fs.Filesystem, name string) bool {
|
||||
return ok
|
||||
}
|
||||
|
||||
func (c *alwaysChanged) Changed() bool {
|
||||
func (*alwaysChanged) Changed() bool {
|
||||
return true
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user