Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Version 2 release: remove logrus and outdated modules #4

Merged
merged 6 commits into from
Jul 31, 2024
Merged

Conversation

rgalanakis
Copy link
Member

Bump to version 2. Upgrading should be relatively simple but will require type changes, especially with logging.

Replace logrus with slog. Go 1.21 added the log/slog package to unify structured logging.

Upgrade echo to v4.

Remove some libraries (sqlw, jwtee) which were useful in years past, but patterns have changed and there are alternative ways to do things now.

These depended on an outdated library,
and were meant mostly as aids to that library.
Since the libraries are newer, they have different and ideally
better ways of doing things, so don't bother trying
to do a direct upgrade.
Required replacing logrus' testing tools
with a new `logctx.Hook` type.

Also remove sqlw since alternatives like pgx have become
so popular and use different logging patterns,
which now that there is slog as a common library,
won't require so many workarounds like sqlw.
Go has generics now, so such utilities are not generally useful.
Libraries should have generic utilities instead.
@rgalanakis rgalanakis merged commit 7b9f0d7 into master Jul 31, 2024
1 check passed
@rgalanakis rgalanakis deleted the v2 branch July 31, 2024 19:23
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.

1 participant