Add missing code-block highlighting
This commit is contained in:
parent
b451fc4cc2
commit
dfb0faaa87
1 changed files with 4 additions and 4 deletions
|
|
@ -269,7 +269,7 @@ c, err := consumer.New(streamName, consumer.WithCounter(counter))
|
||||||
|
|
||||||
The [expvar package](https://golang.org/pkg/expvar/) will display consumer counts:
|
The [expvar package](https://golang.org/pkg/expvar/) will display consumer counts:
|
||||||
|
|
||||||
```
|
```json
|
||||||
"counters": {
|
"counters": {
|
||||||
"checkpoints": 3,
|
"checkpoints": 3,
|
||||||
"records": 13005
|
"records": 13005
|
||||||
|
|
@ -299,7 +299,7 @@ it implements the Logger interface.
|
||||||
|
|
||||||
For example, to use the builtin logging package, we wrap it with myLogger structure.
|
For example, to use the builtin logging package, we wrap it with myLogger structure.
|
||||||
|
|
||||||
```
|
```go
|
||||||
// A myLogger provides a minimalistic logger satisfying the Logger interface.
|
// A myLogger provides a minimalistic logger satisfying the Logger interface.
|
||||||
type myLogger struct {
|
type myLogger struct {
|
||||||
logger *log.Logger
|
logger *log.Logger
|
||||||
|
|
@ -325,7 +325,7 @@ c, err := consumer.New(streamName, consumer.WithLogger(logger))
|
||||||
|
|
||||||
To use a more complicated logging library, e.g. apex log
|
To use a more complicated logging library, e.g. apex log
|
||||||
|
|
||||||
```
|
```go
|
||||||
type myLogger struct {
|
type myLogger struct {
|
||||||
logger *log.Logger
|
logger *log.Logger
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue