Skip to content

Commit

Permalink
Merge pull request #144 from balki/patch-1
Browse files Browse the repository at this point in the history
Fix syntax in documentation
  • Loading branch information
pohly committed Jun 20, 2022
2 parents 47e013c + 059d32c commit 89d4c03
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions logr.go
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ limitations under the License.
//
// Logger grants access to the sink to enable type assertions like this:
// func DoSomethingWithImpl(log logr.Logger) {
// if underlier, ok := log.GetSink()(impl.Underlier) {
// if underlier, ok := log.GetSink().(impl.Underlier); ok {
// implLogger := underlier.GetUnderlying()
// ...
// }
Expand All @@ -181,7 +181,7 @@ limitations under the License.
// // new logger with that modified sink. It does nothing for loggers where
// // the sink doesn't support that parameter.
// func WithFoobar(log logr.Logger, foobar int) logr.Logger {
// if foobarLogSink, ok := log.GetSink()(FoobarSink); ok {
// if foobarLogSink, ok := log.GetSink().(FoobarSink); ok {
// log = log.WithSink(foobarLogSink.WithFooBar(foobar))
// }
// return log
Expand Down

0 comments on commit 89d4c03

Please sign in to comment.