Skip to content

Conversation

@ghost
Copy link

@ghost ghost commented Oct 25, 2021

Closes #17

@ghost ghost changed the title Closes #10 Closes #17 Oct 25, 2021
@ghost ghost mentioned this pull request Oct 26, 2021
bot.go Outdated
// All communications with bot API must go through Bot struct.
// In general you don't need to configure this bot, therefore all options are optional arguments.
func NewBot(token string, opts ...BotOption) (*Bot, error) {
func NewBot(client *http.Client, token string, opts ...BotOption) (*Bot, error) {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMO This would be backward incompatible and would require a new release

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indeed. Add support for custom http client passed to as opts to maintain backward compatibility.

@ghost ghost changed the title Closes #17 Add custom http client support Oct 29, 2021
@DmitryDorofeev DmitryDorofeev merged commit 1d6c376 into mail-ru-im:master Nov 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Custom HTTP Client

2 participants