Skip to content

Commit

Permalink
Update design doc
Browse files Browse the repository at this point in the history
  • Loading branch information
pellared committed Nov 29, 2024
1 parent 7fb4f3c commit bf846bf
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions log/DESIGN.md
Original file line number Diff line number Diff line change
Expand Up @@ -261,12 +261,12 @@ is accepted as a `context.Context` method argument.
Calls to `Enabled` are supposed to be on the hot path and the list of arguments
can be extendend in future. Therefore, in order to reduce the number of heap
allocations and make it possible to handle new arguments, `Enabled` accepts
a `EnabledParameters` struct, defined in [logger.go](logger.go), as the second
a `EnabledParams` struct, defined in [logger.go](logger.go), as the second
method argument.

The `EnabledParameters` getters are returning values using the `(value, ok)`
idiom in order to indicate if the values were actually set by the caller or if
there are unspecified.
The `EnabledParams` uses fields, instead of getters and setters, to allow
simpler usage which allows configuring the `EnabledParams` in the same line
where `Enabled` is called.

### noop package

Expand Down

0 comments on commit bf846bf

Please sign in to comment.