Method receiver 's' is not referenced in method's body, consider removing it
121 return s.SelectStoreToAdd(coLocationStores[1:], filters...)
122}
123
124func (s *ReplicaStrategy) swapStoreToFirst(stores []*core.StoreInfo, id uint64) {125 for i, s := range stores {
126 if s.GetID() == id {
127 stores[0], stores[i] = stores[i], stores[0]
Description
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.
Bad practice
func (f *Unix) Name() string {
return "unix"
}
func (_ *Unix) Name() string {
return "unix"
}
Recommended
func (*Unix) Name() string {
return "unix"
}