Method receiver 'lm' is not referenced in method's body, consider removing it
224 }
225}
226
227func (lm *leasableMachine) isConstantlyRestarting(machine *fly.Machine) bool {228 var ev *fly.MachineEvent
229
230 for _, mev := range machine.Events {
Method receiver 'md' is not referenced in method's body, consider removing it
759 return nil
760}
761
762func (md *machineDeployment) updateMachineInPlace(ctx context.Context, e *machineUpdateEntry) error { 763 lm := e.leasableMachine
764 return lm.Update(ctx, *e.launchInput)
765}
Method receiver 'chk' is not referenced in method's body, consider removing it
150 }
151}
152
153func (chk *ServiceTCPCheck) String(port int) string {154 return fmt.Sprintf("tcp-%d", port)
155}
156
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"
}