-
Notifications
You must be signed in to change notification settings - Fork 17.7k
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
log/slog: change XXXCtx function names to XXXContext #61200
Comments
Not sure how we missed this.
Seems reasonable, and worth doing before the next release candidate. OK to submit before this proposal is accepted. |
Change https://go.dev/cl/508195 mentions this issue: |
Change https://go.dev/cl/508215 mentions this issue: |
#56345 (comment) mentioned readability, just want to double-check that this is preferred: log.InfoContext(ctx, "msg", "key", val) over:
|
Either one is fine. |
See golang/go#61200 for, um, context. Add XXXContext methods, but keep the XXXCtx methods around (deprecated) to avoid breaking people. Change-Id: I6835658615fb4979b03f5ae0516ac8f79b0f241d Reviewed-on: https://go-review.googlesource.com/c/exp/+/508215 Run-TryBot: Jonathan Amsterdam <[email protected]> TryBot-Result: Gopher Robot <[email protected]> Reviewed-by: Russ Cox <[email protected]>
Change https://go.dev/cl/509099 mentions this issue: |
No change in consensus, so accepted. 🎉 |
Generated by: go install golang.org/x/tools/cmd/bundle@latest go install golang.org/x/build/cmd/updatestd@latest updatestd -goroot=$GOROOT -branch=master For #36905. For #55079. Fixes #61174 (vet checkers understanding Go language version). Fixes #61200 (slog InfoCtx -> InfoContext etc). Change-Id: I4f2c86960ce72d6df06e23da1b1297ab3ff2eecf Reviewed-on: https://go-review.googlesource.com/c/go/+/509099 Reviewed-by: Ian Lance Taylor <[email protected]> Reviewed-by: Jonathan Amsterdam <[email protected]> Reviewed-by: Alan Donovan <[email protected]> TryBot-Result: Gopher Robot <[email protected]> Reviewed-by: Heschi Kreinick <[email protected]> Reviewed-by: Bryan Mills <[email protected]> Reviewed-by: Damien Neil <[email protected]>
Fixes golang#61200. Change-Id: I3071dbf673bcd2d24e62644b40d481c953703978 Reviewed-on: https://go-review.googlesource.com/c/go/+/508195 Run-TryBot: Jonathan Amsterdam <[email protected]> Reviewed-by: Russ Cox <[email protected]> TryBot-Result: Gopher Robot <[email protected]>
Generated by: go install golang.org/x/tools/cmd/bundle@latest go install golang.org/x/build/cmd/updatestd@latest updatestd -goroot=$GOROOT -branch=master For golang#36905. For golang#55079. Fixes golang#61174 (vet checkers understanding Go language version). Fixes golang#61200 (slog InfoCtx -> InfoContext etc). Change-Id: I4f2c86960ce72d6df06e23da1b1297ab3ff2eecf Reviewed-on: https://go-review.googlesource.com/c/go/+/509099 Reviewed-by: Ian Lance Taylor <[email protected]> Reviewed-by: Jonathan Amsterdam <[email protected]> Reviewed-by: Alan Donovan <[email protected]> TryBot-Result: Gopher Robot <[email protected]> Reviewed-by: Heschi Kreinick <[email protected]> Reviewed-by: Bryan Mills <[email protected]> Reviewed-by: Damien Neil <[email protected]>
Fixes golang#61200. Change-Id: I3071dbf673bcd2d24e62644b40d481c953703978 Reviewed-on: https://go-review.googlesource.com/c/go/+/508195 Run-TryBot: Jonathan Amsterdam <[email protected]> Reviewed-by: Russ Cox <[email protected]> TryBot-Result: Gopher Robot <[email protected]>
Fixes golang#61200. Change-Id: I3071dbf673bcd2d24e62644b40d481c953703978 Reviewed-on: https://go-review.googlesource.com/c/go/+/508195 Run-TryBot: Jonathan Amsterdam <[email protected]> Reviewed-by: Russ Cox <[email protected]> TryBot-Result: Gopher Robot <[email protected]>
Generated by: go install golang.org/x/tools/cmd/bundle@latest go install golang.org/x/build/cmd/updatestd@latest updatestd -goroot=$GOROOT -branch=master For golang#36905. For golang#55079. Fixes golang#61174 (vet checkers understanding Go language version). Fixes golang#61200 (slog InfoCtx -> InfoContext etc). Change-Id: I4f2c86960ce72d6df06e23da1b1297ab3ff2eecf Reviewed-on: https://go-review.googlesource.com/c/go/+/509099 Reviewed-by: Ian Lance Taylor <[email protected]> Reviewed-by: Jonathan Amsterdam <[email protected]> Reviewed-by: Alan Donovan <[email protected]> TryBot-Result: Gopher Robot <[email protected]> Reviewed-by: Heschi Kreinick <[email protected]> Reviewed-by: Bryan Mills <[email protected]> Reviewed-by: Damien Neil <[email protected]>
For consistency with the rest of the standard library, the names of
InfoCtx
and related functions should be changed toInfoContext
, etc.The text was updated successfully, but these errors were encountered: