go-starter icon indicating copy to clipboard operation
go-starter copied to clipboard

Additional functionality to util package

Open mwieser opened this issue 3 years ago • 1 comments

  • Extend util package with helper functions.
    • Add MIME interface to use mimtype.MIME or an already KnownMIME
    • Add function to detach context to avoid context cancelation. Can be used to pass context information to go routines without a deadline or cancel
    • Add oauth2 helper for PKCE extention
    • add where IN and NIN helper using pg.StringArray to support more arguments
    • add helper to copy test file into folder unique to the test and cleanup helper
  • Add starttls support to mailer
    • Extend mailer mock to support waiting for all expected mails to arrive to test mails sent in go routines
  • update CHANGELOG with information about deprecated mail tls change
  • fix bug detecting test env when running the debugger

mwieser avatar Oct 25 '21 10:10 mwieser

Codecov Report

Patch coverage: 90.20% and project coverage change: +0.94 :tada:

Comparison is base (d14d4b2) 62.86% compared to head (be48d27) 63.80%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #136      +/-   ##
==========================================
+ Coverage   62.86%   63.80%   +0.94%     
==========================================
  Files          78       86       +8     
  Lines        6053     6239     +186     
==========================================
+ Hits         3805     3981     +176     
- Misses       1635     1643       +8     
- Partials      613      615       +2     
Impacted Files Coverage Δ
internal/util/test.go 42.85% <33.33%> (-57.15%) :arrow_down:
internal/util/oauth2/pkce.go 44.44% <44.44%> (ø)
internal/util/int.go 60.00% <60.00%> (ø)
internal/util/context.go 33.33% <66.66%> (+11.11%) :arrow_up:
internal/util/db/db.go 76.59% <87.50%> (+5.62%) :arrow_up:
internal/test/helper_files.go 93.10% <93.10%> (ø)
internal/config/server_config.go 98.16% <100.00%> (+0.01%) :arrow_up:
internal/util/bool.go 100.00% <100.00%> (ø)
internal/util/currency.go 100.00% <100.00%> (ø)
internal/util/db/ilike.go 100.00% <100.00%> (ø)
... and 8 more

... and 2 files with indirect coverage changes

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

codecov[bot] avatar Oct 27 '21 08:10 codecov[bot]