Method receiver 'h' is not referenced in method's body, consider removing it
503 })
504}
505
506func (h *Handler) ServerLogin(ctx *context.Context) {507 param := guard.GetServerLoginParam(ctx)
508 res := remote_server.Login(param.Account, param.Password)
509 if res.Code == 0 && res.Data.Token != "" {
Method receiver 'h' is not referenced in method's body, consider removing it
163 })
164}
165
166func (h *Handler) PluginDetail(ctx *context.Context) {167
168 name := ctx.Query("name")
169
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"
}