divideprojects / Alita_Robot

Usage of both value and pointer receivers GO-W1029
Anti-pattern
Major
2 months agoa year old
Type "moduleStruct" has both value and pointer receivers
649	return ext.EndGroups
650}
651
652func (moduleStruct) warnsButtonHandler(b *gotgbot.Bot, ctx *ext.Context) error {653	query := ctx.Update.CallbackQuery
654	user := query.From
655
Type "moduleStruct" has both value and pointer receivers
608	return ext.EndGroups
609}
610
611func (moduleStruct) resetAllWarns(b *gotgbot.Bot, ctx *ext.Context) error {612	user := ctx.EffectiveSender.User
613	msg := ctx.EffectiveMessage
614	chat := ctx.EffectiveChat
Type "moduleStruct" has both value and pointer receivers
562	return ext.EndGroups
563}
564
565func (moduleStruct) resetWarns(b *gotgbot.Bot, ctx *ext.Context) error {566	msg := ctx.EffectiveMessage
567	chat := ctx.EffectiveChat
568	user := ctx.EffectiveSender.User
Type "moduleStruct" has both value and pointer receivers
515	return ext.EndGroups
516}
517
518func (moduleStruct) setWarnLimit(b *gotgbot.Bot, ctx *ext.Context) error {519	msg := ctx.EffectiveMessage
520	// connection status
521	connectedChat := helpers.IsUserConnected(b, ctx, true, true)
Type "moduleStruct" has both value and pointer receivers
469	return ext.EndGroups
470}
471
472func (moduleStruct) rmWarnButton(b *gotgbot.Bot, ctx *ext.Context) error {473	query := ctx.Update.CallbackQuery
474	user := ctx.EffectiveSender.User
475	chat := ctx.EffectiveChat