Skip to content

Commit eb081e1

Browse files
authored
chore: fix some typos in comments (#667)
1 parent 2d899f0 commit eb081e1

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -638,7 +638,7 @@ Some settings can be changed and will be applied to all loggers:
638638
* `zerolog.LevelFieldName`: Can be set to customize level field name.
639639
* `zerolog.MessageFieldName`: Can be set to customize message field name.
640640
* `zerolog.ErrorFieldName`: Can be set to customize `Err` field name.
641-
* `zerolog.TimeFieldFormat`: Can be set to customize `Time` field value formatting. If set with `zerolog.TimeFormatUnix`, `zerolog.TimeFormatUnixMs` or `zerolog.TimeFormatUnixMicro`, times are formated as UNIX timestamp.
641+
* `zerolog.TimeFieldFormat`: Can be set to customize `Time` field value formatting. If set with `zerolog.TimeFormatUnix`, `zerolog.TimeFormatUnixMs` or `zerolog.TimeFormatUnixMicro`, times are formatted as UNIX timestamp.
642642
* `zerolog.DurationFieldUnit`: Can be set to customize the unit for time.Duration type fields added by `Dur` (default: `time.Millisecond`).
643643
* `zerolog.DurationFieldInteger`: If set to `true`, `Dur` fields are formatted as integers instead of floats (default: `false`).
644644
* `zerolog.ErrorHandler`: Called whenever zerolog fails to write an event on its output. If not set, an error is printed on the stderr. This handler must be thread safe and non-blocking.

context.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -365,13 +365,13 @@ func (c Context) Timestamp() Context {
365365
return c
366366
}
367367

368-
// Time adds the field key with t formated as string using zerolog.TimeFieldFormat.
368+
// Time adds the field key with t formatted as string using zerolog.TimeFieldFormat.
369369
func (c Context) Time(key string, t time.Time) Context {
370370
c.l.context = enc.AppendTime(enc.AppendKey(c.l.context, key), t, TimeFieldFormat)
371371
return c
372372
}
373373

374-
// Times adds the field key with t formated as string using zerolog.TimeFieldFormat.
374+
// Times adds the field key with t formatted as string using zerolog.TimeFieldFormat.
375375
func (c Context) Times(key string, t []time.Time) Context {
376376
c.l.context = enc.AppendTimes(enc.AppendKey(c.l.context, key), t, TimeFieldFormat)
377377
return c

internal/cbor/decode_stream.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ func decodeFloat(src *bufio.Reader) (float64, int) {
9595

9696
switch minor {
9797
case additionalTypeFloat16:
98-
panic(fmt.Errorf("float16 is not suppported in decodeFloat"))
98+
panic(fmt.Errorf("float16 is not supported in decodeFloat"))
9999

100100
case additionalTypeFloat32:
101101
pb := readNBytes(src, 4)

0 commit comments

Comments
 (0)