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

zapslog: Delete x/exp-based implementation #1338

Merged
merged 1 commit into from
Aug 23, 2023

Conversation

abhinav
Copy link
Collaborator

@abhinav abhinav commented Aug 23, 2023

Deletes the implementation of slog.Handler based on
golang.org/x/exp/slog.
Maintaining two implementations doesn't serve much value here.

Remaining files have been renamed to better match their contents:

  • handler.go holds the slog.Handler
  • handler_test.go tests that
  • example_test.go contains example tests

Files that remain are still tagged with go1.21
so they're only visible to Go 1.21 or newer.

This way, go test in this directory with Go 1.20 will not fail:

% GOTOOLCHAIN=go1.20 go test -v
?       go.uber.org/zap/exp/zapslog     [no test files]

Resolves #1337

@codecov
Copy link

codecov bot commented Aug 23, 2023

Codecov Report

Merging #1338 (539b648) into master (fd37f1f) will increase coverage by 0.31%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master    #1338      +/-   ##
==========================================
+ Coverage   97.45%   97.77%   +0.31%     
==========================================
  Files          52       51       -1     
  Lines        3463     3366      -97     
==========================================
- Hits         3375     3291      -84     
+ Misses         77       65      -12     
+ Partials       11       10       -1     
Files Changed Coverage Δ
exp/zapslog/handler.go 86.59% <ø> (ø)

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

Copy link
Member

@mway mway left a comment

Choose a reason for hiding this comment

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

LGTM

Deletes the implementation of slog.Handler based on
golang.org/x/exp/slog.
Maintaining two implementations doesn't serve much value here.

Remaining files have been renamed to better match their contents:

- handler.go holds the slog.Handler
- handler_test.go tests that
- example_test.go contains example tests

Files that remain are still tagged with `go1.21`
so they're only visible to Go 1.21 or newer.

This way, `go test` in this directory with Go 1.20 will not fail:

```
% GOTOOLCHAIN=go1.20 go test -v
?       go.uber.org/zap/exp/zapslog     [no test files]
```

Resolves uber-go#1337
@abhinav abhinav enabled auto-merge (squash) August 23, 2023 16:49
@abhinav abhinav merged commit 55a2367 into uber-go:master Aug 23, 2023
5 checks passed
@abhinav abhinav deleted the slog-rm-pre-120 branch August 23, 2023 18:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

zapslog: Delete exp-based implementation
2 participants