chore: upgrade dependencies and bump to go 1.22
This commit is contained in:
2
vendor/go.uber.org/zap/zapcore/console_encoder.go
generated
vendored
2
vendor/go.uber.org/zap/zapcore/console_encoder.go
generated
vendored
@ -77,7 +77,7 @@ func (c consoleEncoder) EncodeEntry(ent Entry, fields []Field) (*buffer.Buffer,
|
||||
// If this ever becomes a performance bottleneck, we can implement
|
||||
// ArrayEncoder for our plain-text format.
|
||||
arr := getSliceEncoder()
|
||||
if c.TimeKey != "" && c.EncodeTime != nil {
|
||||
if c.TimeKey != "" && c.EncodeTime != nil && !ent.Time.IsZero() {
|
||||
c.EncodeTime(ent.Time, arr)
|
||||
}
|
||||
if c.LevelKey != "" && c.EncodeLevel != nil {
|
||||
|
15
vendor/go.uber.org/zap/zapcore/encoder.go
generated
vendored
15
vendor/go.uber.org/zap/zapcore/encoder.go
generated
vendored
@ -37,6 +37,9 @@ const DefaultLineEnding = "\n"
|
||||
const OmitKey = ""
|
||||
|
||||
// A LevelEncoder serializes a Level to a primitive type.
|
||||
//
|
||||
// This function must make exactly one call
|
||||
// to a PrimitiveArrayEncoder's Append* method.
|
||||
type LevelEncoder func(Level, PrimitiveArrayEncoder)
|
||||
|
||||
// LowercaseLevelEncoder serializes a Level to a lowercase string. For example,
|
||||
@ -90,6 +93,9 @@ func (e *LevelEncoder) UnmarshalText(text []byte) error {
|
||||
}
|
||||
|
||||
// A TimeEncoder serializes a time.Time to a primitive type.
|
||||
//
|
||||
// This function must make exactly one call
|
||||
// to a PrimitiveArrayEncoder's Append* method.
|
||||
type TimeEncoder func(time.Time, PrimitiveArrayEncoder)
|
||||
|
||||
// EpochTimeEncoder serializes a time.Time to a floating-point number of seconds
|
||||
@ -219,6 +225,9 @@ func (e *TimeEncoder) UnmarshalJSON(data []byte) error {
|
||||
}
|
||||
|
||||
// A DurationEncoder serializes a time.Duration to a primitive type.
|
||||
//
|
||||
// This function must make exactly one call
|
||||
// to a PrimitiveArrayEncoder's Append* method.
|
||||
type DurationEncoder func(time.Duration, PrimitiveArrayEncoder)
|
||||
|
||||
// SecondsDurationEncoder serializes a time.Duration to a floating-point number of seconds elapsed.
|
||||
@ -262,6 +271,9 @@ func (e *DurationEncoder) UnmarshalText(text []byte) error {
|
||||
}
|
||||
|
||||
// A CallerEncoder serializes an EntryCaller to a primitive type.
|
||||
//
|
||||
// This function must make exactly one call
|
||||
// to a PrimitiveArrayEncoder's Append* method.
|
||||
type CallerEncoder func(EntryCaller, PrimitiveArrayEncoder)
|
||||
|
||||
// FullCallerEncoder serializes a caller in /full/path/to/package/file:line
|
||||
@ -292,6 +304,9 @@ func (e *CallerEncoder) UnmarshalText(text []byte) error {
|
||||
|
||||
// A NameEncoder serializes a period-separated logger name to a primitive
|
||||
// type.
|
||||
//
|
||||
// This function must make exactly one call
|
||||
// to a PrimitiveArrayEncoder's Append* method.
|
||||
type NameEncoder func(string, PrimitiveArrayEncoder)
|
||||
|
||||
// FullNameEncoder serializes the logger name as-is.
|
||||
|
2
vendor/go.uber.org/zap/zapcore/field.go
generated
vendored
2
vendor/go.uber.org/zap/zapcore/field.go
generated
vendored
@ -47,7 +47,7 @@ const (
|
||||
ByteStringType
|
||||
// Complex128Type indicates that the field carries a complex128.
|
||||
Complex128Type
|
||||
// Complex64Type indicates that the field carries a complex128.
|
||||
// Complex64Type indicates that the field carries a complex64.
|
||||
Complex64Type
|
||||
// DurationType indicates that the field carries a time.Duration.
|
||||
DurationType
|
||||
|
2
vendor/go.uber.org/zap/zapcore/json_encoder.go
generated
vendored
2
vendor/go.uber.org/zap/zapcore/json_encoder.go
generated
vendored
@ -372,7 +372,7 @@ func (enc *jsonEncoder) EncodeEntry(ent Entry, fields []Field) (*buffer.Buffer,
|
||||
final.AppendString(ent.Level.String())
|
||||
}
|
||||
}
|
||||
if final.TimeKey != "" {
|
||||
if final.TimeKey != "" && !ent.Time.IsZero() {
|
||||
final.AddTime(final.TimeKey, ent.Time)
|
||||
}
|
||||
if ent.LoggerName != "" && final.NameKey != "" {
|
||||
|
Reference in New Issue
Block a user