telegram-bot-api icon indicating copy to clipboard operation
telegram-bot-api copied to clipboard

Allow providing Context and improve configuration

Open Syfaro opened this issue 3 years ago • 5 comments

  • Allow providing context.Context to basic request methods
    • Unsure how to deal with more specific methods, duplicating everything seems excessive
  • Use single Config struct for passing config information, allows setting more options before initialization
  • Rework logging to avoid global logger and use Logger set for each BotAPI instance
  • Only use accessible errors, and wrap errors where needed
  • Various other lint fixes

Syfaro avatar Jun 08 '21 19:06 Syfaro

Codecov Report

Merging #456 (5a47464) into master (f2ef272) will decrease coverage by 0.07%. The diff coverage is 40.90%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #456      +/-   ##
==========================================
- Coverage   46.27%   46.20%   -0.08%     
==========================================
  Files           7        6       -1     
  Lines        1545     1554       +9     
==========================================
+ Hits          715      718       +3     
- Misses        773      780       +7     
+ Partials       57       56       -1     
Impacted Files Coverage Δ
params.go 76.31% <ø> (+2.63%) :arrow_up:
passport.go 0.00% <ø> (ø)
configs.go 41.02% <28.12%> (-0.72%) :arrow_down:
bot.go 39.19% <47.27%> (+1.25%) :arrow_up:
types.go 47.12% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update f2ef272...5a47464. Read the comment docs.

codecov[bot] avatar Nov 08 '21 21:11 codecov[bot]

My pull request is completely overridden by the current PR. I think I can close my #481 , the current implementation looks ok

robotomize avatar Nov 12 '21 11:11 robotomize

Why it PR not mered? Context it's a very necessary!

dedalqq avatar Apr 30 '22 14:04 dedalqq

Hi! Any news?

4n70w4 avatar Jun 10 '22 18:06 4n70w4

also waiting for this one to be merged. What's holding it back?

ss89 avatar Oct 31 '22 17:10 ss89