Skip to content

How to resolve variable response types? #76

Description

@roskee

Some of the responses from the telegram bot API return different response types depending on some conditions. For example, function X might return either bool or entity.Message. The situation is as follows,

func (b *bot) EditMessageText(envelop.editMessageTextEnvelop) (entity.Message, error)

// or

func (b *bot) EditMessageText(envelop.editMessageTextEnvelop) (bool, error)

How can we merge these functions to one so that it will work both ways?

Metadata

Metadata

Assignees

No one assigned

    Labels

    difficultIssues that might need experts!

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions